diff --git a/front/MyINPulse-front/src/components/LoginComponent.vue b/front/MyINPulse-front/src/components/LoginComponent.vue index 3706e60..317e1e9 100644 --- a/front/MyINPulse-front/src/components/LoginComponent.vue +++ b/front/MyINPulse-front/src/components/LoginComponent.vue @@ -22,7 +22,7 @@ onMounted(() => { const roles = decoded.realm_access?.roles || []; if (roles.includes("MyINPulse-admin")) { - router.push("/"); + router.push("/admin"); } else if (roles.includes("MyINPulse-entrepreneur")) { router.push("/leanCanva"); } diff --git a/front/MyINPulse-front/src/router/router.ts b/front/MyINPulse-front/src/router/router.ts index 7b7c4ef..860873b 100644 --- a/front/MyINPulse-front/src/router/router.ts +++ b/front/MyINPulse-front/src/router/router.ts @@ -12,12 +12,12 @@ const router = createRouter({ component: () => import("../views/testComponent.vue"), }, { - path: "/login", + path: "/", name: "login", component: () => import("../components/LoginComponent.vue"), }, { - path: "/", + path: "/admin", name: "Admin-main", component: () => import("../views/AdminMain.vue"), }, diff --git a/front/MyINPulse-front/src/stores/authStore.ts b/front/MyINPulse-front/src/stores/authStore.ts index a5874d4..6685a0b 100644 --- a/front/MyINPulse-front/src/stores/authStore.ts +++ b/front/MyINPulse-front/src/stores/authStore.ts @@ -54,7 +54,7 @@ const useAuthStore = defineStore("storeAuth", { async logout() { try { await keycloakService.CallLogout( - import.meta.env.VITE_APP_URL + "/login" //redirect to login page instead of test... + import.meta.env.VITE_APP_URL + "/" //redirect to login page instead of test... ); await this.clearUserData(); } catch (error) {