From 53cf5509d4d787c80cc7839e47b7416d1c40b43d Mon Sep 17 00:00:00 2001 From: Thomas Fransolet Date: Tue, 26 Dec 2023 15:49:57 +0100 Subject: [PATCH] Add handling PDF, Puzzle and Agenda subsection type --- ManagerService/Controllers/SectionController.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ManagerService/Controllers/SectionController.cs b/ManagerService/Controllers/SectionController.cs index e524435..bc120d8 100644 --- a/ManagerService/Controllers/SectionController.cs +++ b/ManagerService/Controllers/SectionController.cs @@ -420,6 +420,18 @@ namespace ManagerService.Controllers section.Data = JsonConvert.SerializeObject(articleDTO); // Include all info from specific section as JSON break; + case SectionType.PDF: + PdfDTO pdfDTO = new PdfDTO(); + section.Data = JsonConvert.SerializeObject(pdfDTO); // Include all info from specific section as JSON + break; + case SectionType.Puzzle: + PuzzleDTO puzzleDTO = new PuzzleDTO(); + section.Data = JsonConvert.SerializeObject(puzzleDTO); // Include all info from specific section as JSON + break; + case SectionType.Agenda: + AgendaDTO agendaDTO = new AgendaDTO(); + section.Data = JsonConvert.SerializeObject(agendaDTO); // Include all info from specific section as JSON + break; } Section sectionCreated = _sectionService.Create(section);