source: Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/EmployeeController.java@ 56a6233

main
Last change on this file since 56a6233 was 996b8ba, checked in by trajchevaM <118018439+trajchevaM@…>, 17 months ago

commit on new and updated functionalities

  • Property mode set to 100644
File size: 739 bytes
Line 
1package finki.paw5.web.controllers;
2
3import finki.paw5.service.AdopterService;
4import org.springframework.stereotype.Controller;
5import org.springframework.ui.Model;
6import org.springframework.web.bind.annotation.GetMapping;
7import org.springframework.web.bind.annotation.RequestMapping;
8
9@Controller
10@RequestMapping("/")
11public class EmployeeController {
12 private final AdopterService adopterService;
13
14 public EmployeeController(AdopterService adopterService) {
15 this.adopterService = adopterService;
16 }
17
18
19 @GetMapping("/approve-adopters")
20 public String getHomePage(Model model){
21 model.addAttribute("needApproval", this.adopterService.findAllThatNeedApproval());
22 return "/approve-adopters";
23 }
24}
Note: See TracBrowser for help on using the repository browser.