Update weather result (in all configuration's section)

This commit is contained in:
Thomas Fransolet 2024-04-11 17:37:10 +02:00
parent 68b45333da
commit 1fa4e188fa

View File

@ -129,6 +129,8 @@ namespace ManagerService.Controllers
List<string> sectionIds = _sectionService.GetAllIdsFromConfiguration(id);
try
{
var weatherSections = _sectionService.GetAllWeatherSectionsFromConfiguration(id);
foreach (var weatherSection in weatherSections)
@ -186,6 +188,10 @@ namespace ManagerService.Controllers
}
}
} catch (Exception e)
{
Console.WriteLine($"Une erreur s'est produite lors de la mise à jour des sections de type météo : {e.Message}");
}
return new OkObjectResult(configuration.ToDTO(sectionIds));
}