diff --git a/API_SQLuedo/API/Controllers/LessonsController.cs b/API_SQLuedo/API/Controllers/LessonsController.cs index bfb0738..dfbbd14 100644 --- a/API_SQLuedo/API/Controllers/LessonsController.cs +++ b/API_SQLuedo/API/Controllers/LessonsController.cs @@ -23,7 +23,7 @@ namespace API.Controllers _logger = logger; } - [HttpGet("lessons/{page}/{number}/{orderCriteria}")] + [HttpGet("lessons/{page:int}/{number:int}/{orderCriteria}")] [ProducesResponseType(typeof(LessonDTO), 200)] [ProducesResponseType(typeof(string), 204)] public IActionResult GetLessons(int page, int number, LessonOrderCriteria orderCriteria) diff --git a/API_SQLuedo/API/Controllers/ParagraphsController.cs b/API_SQLuedo/API/Controllers/ParagraphsController.cs index df0bfff..c6d64a5 100644 --- a/API_SQLuedo/API/Controllers/ParagraphsController.cs +++ b/API_SQLuedo/API/Controllers/ParagraphsController.cs @@ -29,7 +29,7 @@ namespace API.Controllers [ProducesResponseType(typeof(string), 204)] public IActionResult GetParagraphs(int page, int number, ParagraphOrderCriteria orderCriteria) { - var nbParagraph = (_paragraphDataService.GetParagraphs(page, number, orderCriteria)).ToList().Count(); + var nbParagraph = _paragraphDataService.GetParagraphs(page, number, orderCriteria).ToList().Count; if (nbParagraph == 0) { _logger.LogError("[ERREUR] Aucun paragraphe trouvé.");