Пример #1
0
        public async Task <IActionResult> PutCommentForMetadataAsync(Guid metadataUuid, [FromBody] NewCommentResource newComment)
        {
            Comment comment = mapper.Map <NewCommentResource, Comment>(newComment);

            comment.UserMail = httpContextRetriever.HttpContext.User.Identity.Name;

            await commentService.AddRootCommentToMetadataAsync(metadataUuid, comment);

            CommentResource retComment = mapper.Map <Comment, CommentResource>(comment);

            return(Ok(retComment));
        }