From 7dfc7f66f9c7c7dcaddb155039bfc9e6e276d628 Mon Sep 17 00:00:00 2001 From: Denis Natusch Date: Thu, 16 Nov 2023 12:18:37 +0100 Subject: [PATCH] Remove unused model parameter from UserController Closes #21 --- src/main/java/catering/users/UserController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/catering/users/UserController.java b/src/main/java/catering/users/UserController.java index 7e52fb4..eab74cc 100644 --- a/src/main/java/catering/users/UserController.java +++ b/src/main/java/catering/users/UserController.java @@ -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);