From 9723b9263fcbc51cec9a5141f60757bafd951c78 Mon Sep 17 00:00:00 2001 From: "victor.gaborit" Date: Thu, 14 Mar 2024 19:54:39 +0100 Subject: [PATCH] utilisation de GetItems pour GetUserByUsername --- API_SQLuedo/API/Controllers/UserController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/API_SQLuedo/API/Controllers/UserController.cs b/API_SQLuedo/API/Controllers/UserController.cs index 40476a3..1a9a7a0 100644 --- a/API_SQLuedo/API/Controllers/UserController.cs +++ b/API_SQLuedo/API/Controllers/UserController.cs @@ -49,12 +49,12 @@ namespace API.Controllers [HttpGet("user/username/{username}")] [ProducesResponseType(typeof(UserDTO), 200)] [ProducesResponseType(typeof(string), 404)] - public IActionResult GetUserByUsername(string username) + public async Task GetUserByUsername(string username) { try { logger.LogInformation("[INFORMATION] Utilisateur avec l'username {username} a été trouvé.", username); - return Ok(dataService.userService.GetUserByUsername(username)); + return Ok( (await dataService.userService.GetItems(1, 1, null, UserOrderCriteria.ByUsername.ToString().Substring(2), username))); } catch (ArgumentException) {