aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Web/Controllers/CommentController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DevHive.Web/Controllers/CommentController.cs')
-rw-r--r--src/DevHive.Web/Controllers/CommentController.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/DevHive.Web/Controllers/CommentController.cs b/src/DevHive.Web/Controllers/CommentController.cs
index 9c3eeee..c38e300 100644
--- a/src/DevHive.Web/Controllers/CommentController.cs
+++ b/src/DevHive.Web/Controllers/CommentController.cs
@@ -51,15 +51,14 @@ namespace DevHive.Web.Controllers
}
[HttpPut]
- public async Task<IActionResult> UpdateComment(Guid userId, Guid commentId, [FromBody] UpdateCommentWebModel updateCommentWebModel, [FromHeader] string authorization)
+ public async Task<IActionResult> UpdateComment(Guid userId, [FromBody] UpdateCommentWebModel updateCommentWebModel, [FromHeader] string authorization)
{
- if (!await this._commentService.ValidateJwtForComment(commentId, authorization))
+ if (!await this._commentService.ValidateJwtForComment(updateCommentWebModel.CommentId, authorization))
return new UnauthorizedResult();
UpdateCommentServiceModel updateCommentServiceModel =
this._commentMapper.Map<UpdateCommentServiceModel>(updateCommentWebModel);
updateCommentServiceModel.CreatorId = userId;
- updateCommentServiceModel.CommentId = commentId;
Guid id = await this._commentService.UpdateComment(updateCommentServiceModel);