Cleaned admin controller
This commit is contained in:
parent
33bd91b5b7
commit
b384966ec7
@ -7,26 +7,18 @@ import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/admin")
|
||||
@RequiredArgsConstructor
|
||||
public class AdminController {
|
||||
|
||||
@Autowired
|
||||
private 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;
|
||||
// }
|
||||
private final UserService userService;
|
||||
|
||||
@GetMapping()
|
||||
public String home()
|
||||
{
|
||||
// model.addAttribute("user", new String());
|
||||
// model.addAttribute("userNames", userService.getAllRegularUsers());
|
||||
public String home() {
|
||||
return "admin/home";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user