Ejemplo n.º 1
0
        public async Task <ActionResult> AddComment([FromBody] CommentCreationDTO commentCreationDTO)
        {
            var result = await _moviesService.AddUserCommentAsync(commentCreationDTO);

            if (result == -1)
            {
                return(NotFound());
            }
            else if (result == 0)
            {
                return(BadRequest("Failed to save changes."));
            }

            return(NoContent());
        }