예제 #1
0
        public async Task <IHttpActionResult> AddCommentToArticle(int articleId, [FromBody] string comment)
        {
            var user = await userRepository.GetUserAsync(User.Identity.Name);

            await articleRepository.AddCommentToArticleAsync(articleId, user.UserId, comment);

            return(Ok());
        }