test
This commit is contained in:
@@ -39,6 +39,17 @@ public class ProfilController {
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/edit")
|
||||
public String edit(Model model) {
|
||||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||
if (!authentication.getName().equals("anonymousUser")) {
|
||||
String username = authentication.getName();
|
||||
UserProfil userProfile = userService.utilisateurByName(username);
|
||||
model.addAttribute("userProfile", userProfile);
|
||||
}
|
||||
return "editProfil";
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
public String editProfile(Model model) {
|
||||
// Obtenez l'authentification actuelle
|
||||
|
||||
Reference in New Issue
Block a user