Skip to content
Snippets Groups Projects
Commit 53d2191f authored by VIktorGrev's avatar VIktorGrev
Browse files

fix: Fixing routing to home

parent 72188822
No related branches found
No related tags found
No related merge requests found
Pipeline #274966 failed
......@@ -16,7 +16,7 @@ const routes = [
{
path: '',
name: 'home',
component: () => import('../views/HomeView.vue'),
component: () => import('../views/SavingGoalView/RoadmapView.vue'),
},
{
path: 'news',
......@@ -137,7 +137,7 @@ router.beforeEach((to, from, next) => {
if (requiresAuth && !isAuthenticated) {
next({ name: 'login', query: { redirect: to.fullPath } });
} else if (requiresAdmin && userRole !== 'admin') {
next({ name: 'home' });
next({ name: 'unauthorized' });
} else {
next();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment