public async Task <ActionResult> Put(int movieId, [FromBody] AddUpdateUserRatingRequest request) { var status = await movieService.AddOrUpdateUserRatingForMovieAsync(movieId, request); if (status == ResponseStatus.NotFound) { return(NotFound("Movie or User not found")); } if (status == ResponseStatus.Invalid) { return(BadRequest("Invalid rating. Must be b/w 1 and 5")); } if (status == ResponseStatus.Fail) { return(new StatusCodeResult(500)); } return(Ok()); }