Remove unused model parameter from UserController

Closes #21
This commit is contained in:
Denis Natusch 2023-11-16 12:18:37 +01:00 committed by Simon Bruder
parent 11f00f52f0
commit 7dfc7f66f9
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -100,7 +100,7 @@ public class UserController {
@GetMapping("/customers/remove/{id}") @GetMapping("/customers/remove/{id}")
@PreAuthorize("hasRole('ADMIN')") @PreAuthorize("hasRole('ADMIN')")
public String removeCustomer(@PathVariable("id") User user, Model model) { public String removeCustomer(@PathVariable("id") User user) {
userManagement.disableUserAccount(user.getUserAccount()); userManagement.disableUserAccount(user.getUserAccount());
return "redirect:/customers"; return "redirect:/customers";
} }
@ -114,7 +114,7 @@ public class UserController {
@PostMapping("/customers/edit/{id}") @PostMapping("/customers/edit/{id}")
@PreAuthorize("hasRole('ADMIN')") @PreAuthorize("hasRole('ADMIN')")
public String updateCustomer(@PathVariable("id") User user, @RequestParam String username, @RequestParam String address, Model model) { public String updateCustomer(@PathVariable("id") User user, @RequestParam String username, @RequestParam String address) {
user.setUsername(username); user.setUsername(username);
user.setAddress(address); user.setAddress(address);
userManagement.save(user); userManagement.save(user);