This commit is contained in:
2025-08-16 12:00:51 -03:00
parent 5a211d93e5
commit 2f4027de2f
3 changed files with 70 additions and 16 deletions

View File

@@ -40,7 +40,7 @@ public class ElectoralApiService : IElectoralApiService
: null;
}
public async Task<List<CatalogoDto>?> GetCatalogoAmbitosAsync(string authToken, int categoriaId)
public async Task<CatalogoDto?> GetCatalogoAmbitosAsync(string authToken, int categoriaId)
{
var client = _httpClientFactory.CreateClient("ElectoralApiClient");
var request = new HttpRequestMessage(HttpMethod.Get, $"/api/catalogo/getCatalogo?categoriaId={categoriaId}");
@@ -48,7 +48,7 @@ public class ElectoralApiService : IElectoralApiService
var response = await client.SendAsync(request);
return response.IsSuccessStatusCode
? await response.Content.ReadFromJsonAsync<List<CatalogoDto>>()
? await response.Content.ReadFromJsonAsync<CatalogoDto>()
: null;
}