예제 #1
0
        public async Task <ActionResult <PostCommentDTO> > PostPostComment(PostCommentDTO newComment)
        {
            var comment = await _postComment.Create(newComment, UserClaimsGetters.GetUserId(User));

            if (comment != null)
            {
                return(comment);
            }

            return(BadRequest());
        }
예제 #2
0
        public async Task <ActionResult <Comment> > CreateComment(Comment comment)
        {
            await _repo.Create(comment);

            return(Ok(comment));
        }