diff --git a/packages/editor-ui/src/__tests__/router.test.ts b/packages/editor-ui/src/__tests__/router.test.ts index 6d4be7d80a5dd..f0c1423ea07c4 100644 --- a/packages/editor-ui/src/__tests__/router.test.ts +++ b/packages/editor-ui/src/__tests__/router.test.ts @@ -31,6 +31,7 @@ describe('router', () => { test.each([ ['/', VIEWS.WORKFLOWS], + ['/workflows', VIEWS.WORKFLOWS], ['/workflow', VIEWS.NEW_WORKFLOW], ['/workflow/new', VIEWS.NEW_WORKFLOW], ['/workflow/R9JFXwkUCL1jZBuw', VIEWS.WORKFLOW], diff --git a/packages/editor-ui/src/router.ts b/packages/editor-ui/src/router.ts index b303f32d3c3fe..226623843e7be 100644 --- a/packages/editor-ui/src/router.ts +++ b/packages/editor-ui/src/router.ts @@ -58,6 +58,13 @@ const WorkerView = async () => await import('./views/WorkerView.vue'); const WorkflowOnboardingView = async () => await import('@/views/WorkflowOnboardingView.vue'); export const routes = [ + { + path: '/', + name: VIEWS.HOMEPAGE, + meta: { + middleware: ['authenticated'], + }, + }, { path: '/collections/:id', name: VIEWS.COLLECTION, @@ -660,7 +667,7 @@ router.beforeEach(async (to: RouteLocationNormalized & RouteConfig, from, next) return next({ name: VIEWS.SETUP }); } - // Catch old /credentials and /workflow routes and redirect to /projects or /home + // Catch old /credentials and /workflow routes and redirect to /projects await projectsRouteBeforeMiddleware(to, from, next); /**