diff options
Diffstat (limited to 'Backend/Api/Api/Controllers/UserController.cs')
-rw-r--r-- | Backend/Api/Api/Controllers/UserController.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Backend/Api/Api/Controllers/UserController.cs b/Backend/Api/Api/Controllers/UserController.cs index 97f2f8b..4937467 100644 --- a/Backend/Api/Api/Controllers/UserController.cs +++ b/Backend/Api/Api/Controllers/UserController.cs @@ -146,5 +146,23 @@ namespace Api.Controllers return Ok(tosend); return BadRequest(); } + + [HttpGet("{newUsername}/profile/changeMyUsername")] + [Authorize(Roles = "User")] + public async Task<ActionResult<int>> ChangeMyProfileUsername(string newUsername) + { + return await _userService.ChangeMyProfileUsername(newUsername); + } + + + [HttpGet("{id}/changeMyName")] + [Authorize(Roles = "User")] + public async Task<ActionResult<bool>> ChangeMyProfileName(string newName) + { + return Ok(await _userService.ChangeMyProfileName(newName)); + } + + + } } |