utilisation de GetItems pour GetUserByUsername
continuous-integration/drone/push Build is failing Details

MethodeExtensions
Victor GABORIT 1 year ago
parent 7e8abf0ba0
commit 9723b9263f

@ -49,12 +49,12 @@ namespace API.Controllers
[HttpGet("user/username/{username}")] [HttpGet("user/username/{username}")]
[ProducesResponseType(typeof(UserDTO), 200)] [ProducesResponseType(typeof(UserDTO), 200)]
[ProducesResponseType(typeof(string), 404)] [ProducesResponseType(typeof(string), 404)]
public IActionResult GetUserByUsername(string username) public async Task<IActionResult> GetUserByUsername(string username)
{ {
try try
{ {
logger.LogInformation("[INFORMATION] Utilisateur avec l'username {username} a été trouvé.", username); 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) catch (ArgumentException)
{ {

Loading…
Cancel
Save