mirror of
https://github.com/rommapp/romm.git
synced 2026-12-06 15:54:45 +01:00
no match routes redirect to home dashboard
This commit is contained in:
1 parent
df7c84257c
commit
da84ac3349
1 file changed
+3
@@ -39,6 +39,7 @@ const routes = [
|
||||
},
|
||||
{
|
||||
path: "/:pathMatch(.*)*",
|
||||
name: "noMatch",
|
||||
component: () => import("@/views/Dashboard.vue"),
|
||||
},
|
||||
],
|
||||
@@ -59,6 +60,8 @@ router.beforeEach(async (to, from) => {
|
||||
return { name: "login" };
|
||||
} else if (isAuthenticated() && to.name === "login") {
|
||||
return { name: "dashboard" };
|
||||
} else if (to.name == "noMatch"){
|
||||
return { name: "dashboard" };
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user