public async Task <IActionResult> AddComment(int answerId, [FromBody] CommentsRequestViewModel qcvm) { if (ModelState.IsValid == false) { return(BadRequest(ModelState)); } var response = await this.answerCommentService.AddCommentAsync(answerId, qcvm.Comment); return(Ok(response)); }
public async Task <IActionResult> UpdateComment( int answerId, int commentId, [FromBody] CommentsRequestViewModel qcvm) { if (ModelState.IsValid == false) { return(BadRequest(ModelState)); } await this.answerCommentService.UpdateCommentAsync(commentId, answerId, qcvm.Comment); return(NoContent()); }