Ajout article final

This commit is contained in:
jleroy
2024-04-25 10:03:01 +02:00
parent 747c038050
commit c4020f1612
13 changed files with 170 additions and 17 deletions

View File

@@ -70,6 +70,11 @@ public class ArticleController {
model.addAttribute("categories", categorieService.findAllCategories());
model.addAttribute("article", new Article());
model.addAttribute("retrait", new Retrait());
//Récupérer l'utilisateur pour set le retrait à son adresse par defaut
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
String username = authentication.getName();
UserProfil userProfile = userService.utilisateurByName(username);
model.addAttribute("user", userProfile);
return "newArticle";
}