diff --git a/Manager.Interfaces/Models/Section.cs b/Manager.Interfaces/Models/Section.cs index 3cf768f..5f73c39 100644 --- a/Manager.Interfaces/Models/Section.cs +++ b/Manager.Interfaces/Models/Section.cs @@ -118,6 +118,7 @@ namespace Manager.Interfaces.Models Article, PDF, Puzzle, - Agenda + Agenda, + Weather } } diff --git a/ManagerService/Controllers/SectionController.cs b/ManagerService/Controllers/SectionController.cs index 959c06c..4ab7baa 100644 --- a/ManagerService/Controllers/SectionController.cs +++ b/ManagerService/Controllers/SectionController.cs @@ -435,6 +435,10 @@ namespace ManagerService.Controllers AgendaDTO agendaDTO = new AgendaDTO(); section.Data = JsonConvert.SerializeObject(agendaDTO); // Include all info from specific section as JSON break; + case SectionType.Weather: + WeatherDTO weatherDTO = new WeatherDTO(); + section.Data = JsonConvert.SerializeObject(weatherDTO); // Include all info from specific section as JSON + break; } Section sectionCreated = _sectionService.Create(section); @@ -764,5 +768,15 @@ namespace ManagerService.Controllers { return new ObjectResult("AgendaDTO") { StatusCode = 200 }; } + + /// + /// Useless, just to generate dto code + /// + [ProducesResponseType(typeof(WeatherDTO), 200)] + [HttpGet("WeatherDTO")] + public ObjectResult GetWeatherDTO() + { + return new ObjectResult("WeatherDTO") { StatusCode = 200 }; + } } }