Connexion page
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user