Improves apiclient internal code
This commit is contained in:
parent
80219867df
commit
e6c7cdf9b4
|
@ -77,9 +77,7 @@ public class ApiClient
|
||||||
|
|
||||||
private string SetQuery(string? filter)
|
private string SetQuery(string? filter)
|
||||||
{
|
{
|
||||||
var result = "set";
|
return !string.IsNullOrEmpty(filter) ? $"set/{filter.TrimStart('/')}" : "set";
|
||||||
|
|
||||||
return !string.IsNullOrEmpty(filter) ? $"{result}/{filter.TrimStart('/')}" : result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IEnumerable<Set>> FetchSetsAsync()
|
public async Task<IEnumerable<Set>> FetchSetsAsync()
|
||||||
|
@ -94,7 +92,7 @@ public class ApiClient
|
||||||
|
|
||||||
public async Task<Set?> FetchSetByUuid(int uuid)
|
public async Task<Set?> FetchSetByUuid(int uuid)
|
||||||
{
|
{
|
||||||
return await FetchInternalAsync<Set>(SetQuery("uuid/" + uuid));
|
return await FetchInternalAsync<Set>(SetQuery($"uuid/{uuid}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue