diff options
| Commit | 9e86699c9b3aff17e0c4d19850b41b792a9625ef (patch) | |
|---|---|---|
| Author | 2021-01-21 19:12:04 +0200 | |
| Committer | 2021-01-21 19:12:04 +0200 | |
| Files | 8504470031e886e9defcb6399fc7365bab17ddff /src/DevHive.Web/Controllers | |
| DevHive-9e86699c9b3aff17e0c4d19850b41b792a9625ef.tar DevHive-9e86699c9b3aff17e0c4d19850b41b792a9625ef.tar.gz DevHive-9e86699c9b3aff17e0c4d19850b41b792a9625ef.zip | ||
| Parent | 1001c3d5c6f979c56daf98e7ed82cee2ff09ab7f (diff) | |
Removed HTTP Patch; Refactored HTTP Put; Fixed Update bug
1 files changed, 0 insertions, 14 deletions
| -rw-r--r-- | src/DevHive.Web/Controllers/UserController.cs | 14 |
diff --git a/src/DevHive.Web/Controllers/UserController.cs b/src/DevHive.Web/Controllers/UserController.cs index 7121ac8..fbbbbff 100644 --- a/src/DevHive.Web/Controllers/UserController.cs +++ b/src/DevHive.Web/Controllers/UserController.cs @@ -96,20 +96,6 @@ namespace DevHive.Web.Controllers return new AcceptedResult("UpdateUser", userWebModel); } - - [HttpPatch] - public async Task<IActionResult> Patch(Guid id, [FromBody] List<Patch> patch, [FromHeader] string authorization) - { - if (!await this._userService.ValidJWT(id, authorization)) - return new UnauthorizedResult(); - - UserServiceModel userServiceModel = await this._userService.PatchUser(id, patch); - - if (userServiceModel == null) - return new BadRequestObjectResult("Wrong patch properties"); - else - return new OkObjectResult(this._userMapper.Map<UserWebModel>(userServiceModel)); - } #endregion #region Delete |
