Connexion page

This commit is contained in:
jleroy
2024-04-23 10:34:47 +02:00
parent 0a156ee2f7
commit 39efe3212f
9 changed files with 111 additions and 49 deletions

View File

@@ -1,7 +1,7 @@
package fr.eni.enchere.controllers;
import fr.eni.enchere.bll.UserService;
import fr.eni.enchere.bo.User;
import fr.eni.enchere.bo.UserProfil;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@@ -21,12 +21,12 @@ public class InscriptionController {
@GetMapping
public String viewInscription(Model model) {
model.addAttribute("user", new User());
model.addAttribute("user", new UserProfil());
return "inscription";
}
@PostMapping("/newUser")
public String setUser(@ModelAttribute User user) {
public String setUser(@ModelAttribute UserProfil user) {
userService.setUtilisateur(user);
return "redirect:/accueil";
}