}
@RequestMapping(value = "/movies/{movieId}", method = RequestMethod.POST, headers = "Accept=text/html")
public String updateMovie(Model model, @PathVariable String movieId, @RequestParam(value = "rated",required = false) Integer stars, @RequestParam(value = "comment",required = false) String comment) {
Movie movie = movieRepository.findById(movieId);
User user = userDetailsService.getUserFromSession();
userDetailsService.rate(user, movie, stars, comment);
return singleMovieView(model,movieId);
}