fix a couple of things

This commit is contained in:
Sirttas
2026-06-28 22:10:34 +02:00
parent a0cc120fec
commit 45ed773119
+4 -2
View File
@@ -17,10 +17,11 @@ const router = createRouter({
});
app.use(pinia);
app.use(router);
const authStore = useAuthStore();
await authStore.bootstrap();
router.beforeEach(to => {
if (!to.meta.public && !authStore.isAuthenticated) {
return {name: routeNames.home};
@@ -28,4 +29,5 @@ router.beforeEach(to => {
return true;
});
authStore.bootstrap().finally(() => app.mount('#app'));
app.use(router);
app.mount('#app');