Пример #1
0
        public async Task <ActionResult <Song> > AddComment(CommentViewModel model)
        {
            var user = await _userManager.GetUserAsync(HttpContext.User);

            var result = await _songService.AddComment(model.SongId, model.Text, user);

            return(result.Succeeded ? (ActionResult)Ok() : BadRequest(result.Error));
        }