fix user login page display

This commit is contained in:
isUnknown 2025-04-30 16:21:56 +02:00
parent de52c5e6be
commit 009752ff32
3 changed files with 15 additions and 8 deletions

View file

@ -17,12 +17,12 @@ router.beforeEach(async (to, from, next) => {
if (to.path === '/login') next();
if (!userStore.user) next('/login');
const api = useApiStore(pinia);
try {
const res = await api.fetchData(to.path);
if (!res.user) next('/login');
pageStore.page = res.page;
userStore.user = res.user;
next();