diff options
| author | transtrike <transtrike@gmail.com> | 2021-02-27 11:18:09 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-02-27 11:18:09 +0200 |
| commit | 83ae76a1b93c91cf7cfb5fc9ea1ef728ee47c839 (patch) | |
| tree | 78711c29342fc3d5b5e643403a507c9b030afa4d /src/Web/DevHive.Web/Controllers/UserController.cs | |
| parent | 784b5fc621f71fa94eddf276b0b932ba7d1aa873 (diff) | |
| download | DevHive-83ae76a1b93c91cf7cfb5fc9ea1ef728ee47c839.tar DevHive-83ae76a1b93c91cf7cfb5fc9ea1ef728ee47c839.tar.gz DevHive-83ae76a1b93c91cf7cfb5fc9ea1ef728ee47c839.zip | |
JWT Validations works; Introduced more bugs to fix later
Diffstat (limited to 'src/Web/DevHive.Web/Controllers/UserController.cs')
| -rw-r--r-- | src/Web/DevHive.Web/Controllers/UserController.cs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/Web/DevHive.Web/Controllers/UserController.cs b/src/Web/DevHive.Web/Controllers/UserController.cs index 214fba7..a1e87f4 100644 --- a/src/Web/DevHive.Web/Controllers/UserController.cs +++ b/src/Web/DevHive.Web/Controllers/UserController.cs @@ -93,23 +93,6 @@ namespace DevHive.Web.Controllers return new AcceptedResult("UpdateUser", userWebModel); } - - [HttpPut] - [Route("ProfilePicture")] - [Authorize(Roles = "User,Admin")] - public async Task<IActionResult> UpdateProfilePicture(Guid userId, [FromForm] UpdateProfilePictureWebModel updateProfilePictureWebModel, [FromHeader] string authorization) - { - if (!await this._userService.ValidJWT(userId, authorization)) - return new UnauthorizedResult(); - - UpdateProfilePictureServiceModel updateProfilePictureServiceModel = this._userMapper.Map<UpdateProfilePictureServiceModel>(updateProfilePictureWebModel); - updateProfilePictureServiceModel.UserId = userId; - - ProfilePictureServiceModel profilePictureServiceModel = await this._userService.UpdateProfilePicture(updateProfilePictureServiceModel); - ProfilePictureWebModel profilePictureWebModel = this._userMapper.Map<ProfilePictureWebModel>(profilePictureServiceModel); - - return new AcceptedResult("UpdateProfilePicture", profilePictureWebModel); - } #endregion #region Delete |
