示例#1
0
        public async Task <ActionResult> AddMovieToSeen([FromBody] MovieIdRequest request)
        {
            try
            {
                int response = await _userService.AddMovieToSeenAsync(_userManager.GetUserId(User), request.MovieId);

                return(Ok(response));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message);
                return(BadRequest(ex.Message));
            }
        }
示例#2
0
        public async Task <ActionResult> RemoveMovieFromFavourites([FromBody] MovieIdRequest request)
        {
            try
            {
                string response = await _userService.RemoveMovieFromFavouritesAsync(_userManager.GetUserId(User), request.MovieId);

                return(Ok(response));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message);
                return(BadRequest(ex.Message));
            }
        }