Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Web / DevHive.Web / Controllers / UserController.cs
diff options
context:
space:
mode:
Commit83ae76a1b93c91cf7cfb5fc9ea1ef728ee47c839 (patch)
Author
 transtrike <transtrike@gmail.com>
2021-02-27 11:18:09 +0200
Committer
 transtrike <transtrike@gmail.com>
2021-02-27 11:18:09 +0200
Files78711c29342fc3d5b5e643403a507c9b030afa4d /src/Web/DevHive.Web/Controllers/UserController.cs
DevHive-83ae76a1b93c91cf7cfb5fc9ea1ef728ee47c839.tar
DevHive-83ae76a1b93c91cf7cfb5fc9ea1ef728ee47c839.tar.gz
DevHive-83ae76a1b93c91cf7cfb5fc9ea1ef728ee47c839.zip
Parent784b5fc621f71fa94eddf276b0b932ba7d1aa873 (diff)
JWT Validations works; Introduced more bugs to fix later
1 files changed, 0 insertions, 17 deletions
-rw-r--r--src/Web/DevHive.Web/Controllers/UserController.cs17
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