Added WeatherDTO + fix export issue + config layout values (rounded, isPictureBackground and ScreenPercentage) + values for mapDTO

This commit is contained in:
Thomas Fransolet 2024-04-10 09:20:51 +02:00
parent b5a3336670
commit 1db418e708
2 changed files with 16 additions and 1 deletions

View File

@ -118,6 +118,7 @@ namespace Manager.Interfaces.Models
Article,
PDF,
Puzzle,
Agenda
Agenda,
Weather
}
}

View File

@ -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 };
}
/// <summary>
/// Useless, just to generate dto code
/// </summary>
[ProducesResponseType(typeof(WeatherDTO), 200)]
[HttpGet("WeatherDTO")]
public ObjectResult GetWeatherDTO()
{
return new ObjectResult("WeatherDTO") { StatusCode = 200 };
}
}
}