diff --git a/middleware/redirect.global.ts b/middleware/redirect.global.ts index 9538c47..590b9da 100644 --- a/middleware/redirect.global.ts +++ b/middleware/redirect.global.ts @@ -1,4 +1,7 @@ // middleware/redirect.js export default defineNuxtRouteMiddleware((to, from) => { - if (buildName() == "haditha" && to.path == '/') return navigateTo({ name: "haditha" }); + if (buildName() == "haditha" && to.path == "/") + return navigateTo({ name: "haditha" }); + else if (buildName() == "haditha" && to.path == "/login") + return navigateTo({ name: "hadithaLogin" }); }); diff --git a/routes/haditha.ts b/routes/haditha.ts index 5936935..4a6c740 100644 --- a/routes/haditha.ts +++ b/routes/haditha.ts @@ -51,9 +51,9 @@ export default [ file: "~/systems/hadith_ui/pages/haditha/public-pages/rules.vue", }, - // { - // name: "hadithaLogin", - // path: "/haditha/login", - // file: "~/systems/hadith_ui/pages/haditha/login.vue", - // } + { + name: "hadithaLogin", + path: "/haditha/login", + file: "~/systems/hadith_ui/pages/haditha/login.vue", + } ]; diff --git a/stores/authStore.ts b/stores/authStore.ts index 0654fd2..202c4f2 100644 --- a/stores/authStore.ts +++ b/stores/authStore.ts @@ -266,6 +266,8 @@ export const useAuthStore = defineStore("authStore", { // }); }, async login(credentials) { + console.info(import.meta.env.VITE_AUTH_BASE_URL) + try { const { $api } = useNuxtApp(); const response = await $api(apis.login, { diff --git a/systems/hadith_ui b/systems/hadith_ui index 3800df1..363d126 160000 --- a/systems/hadith_ui +++ b/systems/hadith_ui @@ -1 +1 @@ -Subproject commit 3800df1b4005255a315df026e1c7ea9d7f9a71c2 +Subproject commit 363d1269f2ff09e8e138d7a8e8aaa773d59913f3