mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Remove redundant code from viewProfile method
This commit is contained in:
parent
b0279a5c78
commit
5736b49080
|
@ -69,9 +69,6 @@ public class UserController {
|
|||
@GetMapping("/profile")
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
public String viewProfile(Model model, @LoggedIn UserAccount userAccount) {
|
||||
if (userAccount == null) {
|
||||
return "redirect:/";
|
||||
}
|
||||
User user = userManagement.getUserByAccount(userAccount).get();
|
||||
model.addAttribute("profileForm", new ProfileForm(user.getUsername(), user.getAddress(), user.getFullName(), ""));
|
||||
return "profile";
|
||||
|
|
Loading…
Reference in a new issue