Ignore:
Timestamp:
01/05/23 04:11:40 (23 months ago)
Author:
andrejtodorovski <82031894+andrejtodorovski@…>
Branches:
main
Children:
1bd8d1e
Parents:
7d43957
Message:

Added admin view of pending roles and approve functionality

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/autopartz/controller/UserController.java

    r7d43957 r676144b  
    2828    @GetMapping("orders")
    2929    public String getOrdersForUser(Model model, HttpServletRequest request){
    30         Integer id = userService.findByUsername(request.getRemoteUser()).getID_user();
     30        Integer id = userService.findByUsername(request.getRemoteUser()).getId();
    3131        model.addAttribute("userOrders",ordersForUserRepository.findAllByUserid(id));
    3232        model.addAttribute("bodyContent","ordersForUser");
     
    3535    @GetMapping("repairs")
    3636    public String getRepairsForUser(Model model, HttpServletRequest request){
    37         Integer id = userService.findByUsername(request.getRemoteUser()).getID_user();
     37        Integer id = userService.findByUsername(request.getRemoteUser()).getId();
    3838        model.addAttribute("userRepairs",repairsForUserRepository.findAllByUserid(id));
    3939        model.addAttribute("bodyContent","repairsForUser");
     
    4242    @GetMapping("reviews")
    4343    public String getReviewsForUser(Model model,HttpServletRequest request){
    44         Integer id = userService.findByUsername(request.getRemoteUser()).getID_user();
     44        Integer id = userService.findByUsername(request.getRemoteUser()).getId();
    4545        model.addAttribute("userReviews",reviewsForUserRepository.findAllByUserid(id));
    4646        model.addAttribute("bodyContent","reviewsForUser");
Note: See TracChangeset for help on using the changeset viewer.