public async Task <IActionResult> CreateComment(CreatePostCommentCommand createPostCommentCommand) { if (!ModelState.IsValid) { return(NoContent()); } await Mediator.Send(createPostCommentCommand); return(NoContent()); }
public async Task <ActionResult <int> > CreateComment(CreatePostCommentCommand command) { return(await Mediator.Send(command)); }