public IActionResult UpdateComment(int commentId, int userId, CommentForUpdateDTO model) { if (!ModelState.IsValid) { return(BadRequest(Messages.ModelNullOrEmpty)); } var postComment = _postCommentService.GetById(commentId); if (!postComment.Success) { return(BadRequest(postComment.Message)); } if (postComment.Data.UserId != userId) { return(BadRequest(Messages.YouUnauthorizeChangeThisComment)); } postComment.Data.Comment = model.comment; var result = _postCommentService.Update(postComment.Data); if (result.Success) { return(Ok(result.Message)); } return(BadRequest(result.Message)); }