public ActionResult <Comment> Post(string postId, [FromBody] Comment comment) { return(_postService.CreateComment(postId, comment)); }
public CommentReadDto CreateComment(int postId, [FromBody] CommentCreateDto dto) { var userId = GetUserIdFromToken(); return(_postService.CreateComment(dto, postId, userId)); }
public ActionResult <Post> Create(string postId, Comment comment) { Post result = _postService.CreateComment(postId, comment); return(CreatedAtRoute("GetPost", new { id = result.Id }, result)); }