add KnowledgeWorkFlow system

This commit is contained in:
Robin COuret
2026-03-08 01:33:21 +01:00
parent 73fff0955b
commit d1e5a6b0c7
25 changed files with 351 additions and 174 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
import { createRouter, createWebHistory } from 'vue-router'
import { isAuthenticated } from '@/services/apiAxios'
import { isAuthenticated } from '@/services/api'
const pagesWithoutGuard = ['login', 'app', 'register']
@@ -33,9 +33,10 @@ const router = createRouter({
],
})
// Guard system
router.beforeEach(async (to, from) => {
const isAuth = await isAuthenticated()
if (!isAuth && pagesWithoutGuard.includes(to.name!.toString())) {
if (!isAuth && !pagesWithoutGuard.includes(to.name!.toString())) {
return { name: 'login' }
}
})