From de2d8102906b25422c85c274bb482db0d67eb763 Mon Sep 17 00:00:00 2001
From: Maxime Gosselin~ <maxime.gosselin.etu@univ-lille.fr>
Date: Fri, 7 Mar 2025 10:27:46 +0100
Subject: [PATCH] =?UTF-8?q?Correction=20du=20bug=20empechant=20la=20cr?=
 =?UTF-8?q?=C3=A9ation=20de=20fils?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 WEB-INF/src/controleur/ThreadController.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/WEB-INF/src/controleur/ThreadController.java b/WEB-INF/src/controleur/ThreadController.java
index 865fbac..c595c92 100644
--- a/WEB-INF/src/controleur/ThreadController.java
+++ b/WEB-INF/src/controleur/ThreadController.java
@@ -43,13 +43,15 @@ public class ThreadController extends HttpServlet {
             }
         }
 
-        if(daoThread.findById(idThread) == null){
+        if(!action.equals("create") && daoThread.findById(idThread) == null){
             req.setAttribute("error", "Ne changez pas l'url vous même!");
             req.getRequestDispatcher("/WEB-INF/vue/error.jsp").forward(req, resp);
             return;
         }
 
         Follower follow = new Follower(username, idThread);
+
+        System.out.println("action : " + action);
         
         switch (action){
             case "follow":
-- 
GitLab