Un peu de tout

This commit is contained in:
mepiphana2023
2024-04-30 13:14:37 +02:00
parent 474dec272c
commit 882d9bede0
20 changed files with 187 additions and 80 deletions

View File

@@ -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";
}
}