Un peu de tout
This commit is contained in:
@@ -6,10 +6,7 @@ import org.springframework.ui.Model;
|
||||
import fr.eni.enchere.bll.UserService;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
|
||||
@@ -87,7 +84,7 @@ public class ProfilController {
|
||||
//Supprimer le compte
|
||||
userService.deleteUtilisateur(userProfile.getId());
|
||||
//ATTENTION AJOUTER LA DECONNEXION
|
||||
return "redirect:/accueil";
|
||||
return "redirect:/enchere";
|
||||
}
|
||||
|
||||
@PostMapping("/updateUser")
|
||||
@@ -127,4 +124,15 @@ public class ProfilController {
|
||||
return "accueil";
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/showProfil")
|
||||
public String showOtherProfil(@RequestParam("userPseudo") String userPseudo, Model model) {
|
||||
|
||||
model.addAttribute("userProfil", userService.utilisateurByName(userPseudo));
|
||||
|
||||
|
||||
|
||||
return "showProfil";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user