Cleaned admin controller
This commit is contained in:
parent
33bd91b5b7
commit
b384966ec7
@ -7,29 +7,21 @@ import org.springframework.ui.Model;
|
|||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/admin")
|
@RequestMapping("/admin")
|
||||||
|
@RequiredArgsConstructor
|
||||||
public class AdminController {
|
public class AdminController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
// @RequestMapping
|
|
||||||
// public ModelAndView viewManageUsers(Principal principal) {
|
|
||||||
// ModelAndView modelAndView = new ModelAndView("/admin/home");
|
|
||||||
// modelAndView.addObject("user", new String());
|
|
||||||
// modelAndView.addObject("userNames", userService.getAllRegularUsers());
|
|
||||||
// return modelAndView;
|
|
||||||
// }
|
|
||||||
|
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String home()
|
public String home() {
|
||||||
{
|
|
||||||
// model.addAttribute("user", new String());
|
|
||||||
// model.addAttribute("userNames", userService.getAllRegularUsers());
|
|
||||||
return "admin/home";
|
return "admin/home";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/change-passphrase")
|
@GetMapping("/change-passphrase")
|
||||||
public String changePassphrase(Model model) {
|
public String changePassphrase(Model model) {
|
||||||
model.addAttribute("userNames", userService.getAllRegularUsers());
|
model.addAttribute("userNames", userService.getAllRegularUsers());
|
||||||
|
Loading…
Reference in New Issue
Block a user