Update redirect.global
This commit is contained in:
parent
3ee869a66b
commit
1b25bfa2c5
|
@ -1,4 +1,7 @@
|
||||||
// middleware/redirect.js
|
// middleware/redirect.js
|
||||||
export default defineNuxtRouteMiddleware((to, from) => {
|
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" });
|
||||||
});
|
});
|
||||||
|
|
|
@ -51,9 +51,9 @@ export default [
|
||||||
file: "~/systems/hadith_ui/pages/haditha/public-pages/rules.vue",
|
file: "~/systems/hadith_ui/pages/haditha/public-pages/rules.vue",
|
||||||
},
|
},
|
||||||
|
|
||||||
// {
|
{
|
||||||
// name: "hadithaLogin",
|
name: "hadithaLogin",
|
||||||
// path: "/haditha/login",
|
path: "/haditha/login",
|
||||||
// file: "~/systems/hadith_ui/pages/haditha/login.vue",
|
file: "~/systems/hadith_ui/pages/haditha/login.vue",
|
||||||
// }
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -266,6 +266,8 @@ export const useAuthStore = defineStore("authStore", {
|
||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
async login(credentials) {
|
async login(credentials) {
|
||||||
|
console.info(import.meta.env.VITE_AUTH_BASE_URL)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { $api } = useNuxtApp();
|
const { $api } = useNuxtApp();
|
||||||
const response = await $api(apis.login, {
|
const response = await $api(apis.login, {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3800df1b4005255a315df026e1c7ea9d7f9a71c2
|
Subproject commit 363d1269f2ff09e8e138d7a8e8aaa773d59913f3
|
Loading…
Reference in New Issue
Block a user