fix(client-side): update story middleware

fix redirect url for unauthenticated users
This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2024-11-11 23:02:19 -05:00
parent b65f618b7e
commit f049619178
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -20,7 +20,7 @@ export const storyMiddleware = defineNuxtRouteMiddleware(async (to, from) => {
}
console.log("fns", story, error);
if (!data?.value?.user && story.value?.currentChapter.loggedInOnly) {
return navigateTo("/login");
return navigateTo("/auth/login");
}
});