Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @GetMapping("search")
- public ModelAndView searchFilm(@Valid searchForm form, Errors errors) {
- var modelAndView = new ModelAndView("film");
- if (errors.hasErrors()) {
- return modelAndView;
- }
- client.findByEpisodeId(form.getId())
- .ifPresent(film -> modelAndView.addObject(film));
- return modelAndView;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement