Skip to content

Commit 1b07b9f

Browse files
committed
Rework Vue Router AuthGuard to apply permission and redirect to error pages
1 parent c6b3371 commit 1b07b9f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/assets/router/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import AccountRoutes from '@userfrosting/sprinkle-account/routes'
22
import AdminRoutes from '@userfrosting/sprinkle-admin/routes'
3+
import ErrorRoutes from '@userfrosting/sprinkle-core/routes'
34
import { createRouter, createWebHistory } from 'vue-router'
45

56
const router = createRouter({
@@ -24,7 +25,8 @@ const router = createRouter({
2425
component: () => import('../views/AboutView.vue')
2526
},
2627
// Include sprinkles routes
27-
...AccountRoutes
28+
...AccountRoutes,
29+
...ErrorRoutes
2830
]
2931
},
3032
{

0 commit comments

Comments
 (0)