partido + melhorias
All checks were successful
API and ETL Build / build_etl (push) Successful in 17s
API and ETL Build / build_api (push) Successful in 9s

This commit is contained in:
2025-05-31 20:46:48 -03:00
parent 146495c07b
commit a3d67198af
14 changed files with 137 additions and 74 deletions

View File

@@ -50,6 +50,11 @@ namespace OpenCand.API.Services
var result = await candidatoRepository.GetCandidatoAsync(idcandidato);
var eleicoes = await candidatoRepository.GetCandidatoMappingById(idcandidato);
foreach (var eleicao in eleicoes)
{
eleicao.Partido = await candidatoRepository.GetPartidoBySigla(eleicao.Sgpartido);
}
if (result == null)
{
throw new KeyNotFoundException($"Candidato with ID {idcandidato} not found.");