|
@@ -54,7 +54,9 @@ router.beforeResolve(async (to, from, next) => {
|
|
|
} else if (authentication === 'all') {
|
|
|
accessRoutes = await store.dispatch('routes/setAllRoutes')
|
|
|
}
|
|
|
- router.addRoutes(accessRoutes)
|
|
|
+ accessRoutes.forEach((item) => {
|
|
|
+ router.addRoute(item)
|
|
|
+ })
|
|
|
next({ ...to, replace: true })
|
|
|
} catch {
|
|
|
await store.dispatch('user/resetAccessToken')
|