fix(client-side): update story middleware
fix redirect url for unauthenticated users
This commit is contained in:
parent
b65f618b7e
commit
f049619178
@ -20,7 +20,7 @@ export const storyMiddleware = defineNuxtRouteMiddleware(async (to, from) => {
|
|||||||
}
|
}
|
||||||
console.log("fns", story, error);
|
console.log("fns", story, error);
|
||||||
if (!data?.value?.user && story.value?.currentChapter.loggedInOnly) {
|
if (!data?.value?.user && story.value?.currentChapter.loggedInOnly) {
|
||||||
return navigateTo("/login");
|
return navigateTo("/auth/login");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user