Exemple #1
0
        /// <summary>
        /// Add a movie to an existing watchlist
        /// </summary>
        public async Task <ActionResult <Watchlist> > AddMovie(int watchlistId, int movieId)
        {
            var watchlist = await _watchlistService.AddMovieToListAsync(GetUserId(), watchlistId, movieId);

            if (watchlist == null)
            {
                return(new BadRequestObjectResult(Errors.AddErrorToModelState("Watchlist doesn't exist", ModelState)));
            }

            return(new OkObjectResult(watchlist));
        }