checkpoint
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 7s
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 7s
This commit is contained in:
@@ -17,7 +17,8 @@ const routes = [
|
||||
{ path: "/register", component: RegisterForm },
|
||||
{ path: "/items", component: ItemsList, meta: { requiresAuth: true } },
|
||||
{ path: "/item/new", component: ItemForm, meta: { requiresAuth: true } },
|
||||
{ path: "/item/:id", component: ItemForm, meta: { requiresAuth: true } }
|
||||
{ path: "/item/:id", component: ItemForm, meta: { requiresAuth: true } },
|
||||
{ path: "/users", component: ItemsList, meta: { requiresAuth: true } }
|
||||
]; // I really like this
|
||||
|
||||
const router = createRouter({
|
||||
@@ -36,5 +37,6 @@ router.beforeEach((to, from, next) => {
|
||||
}
|
||||
|
||||
});
|
||||
// if the api responds unauthorized (401) then it also will auto-redirect to the login page
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user