Exemple #1
0
        public async Task <IActionResult> AddFavouriteMovie(int movieId)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            var user = User;

            var result = await _movieService.AddFavouriteMovie(user, movieId);

            if (result.Error != null)
            {
                return(BadRequest(result));
            }

            return(Ok(result));
        }