Ignore:
Timestamp:
02/10/23 01:18:53 (21 months ago)
Author:
DenicaKj <dkorvezir@…>
Branches:
master
Children:
7926d68
Parents:
01a1ca6
Message:

added rating

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/moviezone/web/HomeController.java

    r01a1ca6 r73f0dbc  
    395395        return "redirect:/myTickets";
    396396    }
     397    @PostMapping("/addRating/{id}")
     398    public String addRating(@RequestParam Long rate,@PathVariable Long id,HttpServletRequest request, HttpServletResponse respons)
     399    {
     400        Customer customer=customerService.findByUsername(request.getRemoteUser());
     401        System.out.println(customer.getFirst_name());
     402        customerRatesFilmService.addRating(customer.getId_user(),Integer.valueOf(id.intValue()),Integer.valueOf(rate.intValue()));
     403        return "redirect:/home/getFilm/"+id;
     404    }
    397405
    398406}
Note: See TracChangeset for help on using the changeset viewer.