Exemple #1
0
        public async Task <IActionResult> PutCommentForExperiencePostAsync(Guid experiencePostUuid, [FromBody] NewCommentResource newComment)
        {
            Comment comment = mapper.Map <NewCommentResource, Comment>(newComment);

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

            await commentService.AddRootCommentToExperiencePostAsync(experiencePostUuid, comment);

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

            return(Ok(retComment));
        }