public async Task <IActionResult> GetMoviesBasedonSpecificUserRatings(string user) { var result = await _movieService.GetMoviesOnUserRating(user); return((result.MoviesResponses.FirstOrDefault().Errors == null || !result.MoviesResponses.FirstOrDefault().Errors.Any()) ? Ok(result.MoviesResponses) : ResponseStatusCodeParser.Parse(result.MoviesResponses.FirstOrDefault().Errors, result.MoviesResponses)); }
public async Task <IActionResult> AddorUpdateMovieRating([FromBody] AddMovieRating addMovieRating) { var result = await _movieService.AddorUpdateMovieRating(addMovieRating); return((result.Errors == null || !result.Errors.Any()) ? Ok(result.Success) : ResponseStatusCodeParser.Parse(result.Errors, result)); }
public async Task <IActionResult> GetMoviesOnFilterCriteria([FromBody] MovieRequest movieRequest) { var result = await _movieService.GetMoviesOnFilterCriteria(movieRequest); return((result.MoviesResponses.FirstOrDefault().Errors == null || !result.MoviesResponses.FirstOrDefault().Errors.Any()) ? Ok(result.MoviesResponses) : ResponseStatusCodeParser.Parse(result.MoviesResponses.FirstOrDefault().Errors, result.MoviesResponses)); }