diff options
Diffstat (limited to 'Backend/Api/Api/Controllers/UserController.cs')
-rw-r--r-- | Backend/Api/Api/Controllers/UserController.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Backend/Api/Api/Controllers/UserController.cs b/Backend/Api/Api/Controllers/UserController.cs index 1ef8234..94e4b41 100644 --- a/Backend/Api/Api/Controllers/UserController.cs +++ b/Backend/Api/Api/Controllers/UserController.cs @@ -55,5 +55,14 @@ namespace Api.Controllers return Ok(rez); return BadRequest(); } + [HttpGet("{id}/profile")] + [Authorize(Roles = "User")] + public async Task<ActionResult<UserSend>> GetUserById(string id) + { + var rez = await _userService.getUserById(id); + if (rez != null) + return Ok(rez); + return BadRequest(); + } } } |