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 1faedf18a0
commit 024939de5f
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

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