Skip to content

Commit

Permalink
fix: Fix homepage route
Browse files Browse the repository at this point in the history
  • Loading branch information
cstuncsik committed Feb 17, 2024
1 parent 72be523 commit b874f0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/editor-ui/src/__tests__/router.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
9 changes: 8 additions & 1 deletion packages/editor-ui/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);

/**
Expand Down

0 comments on commit b874f0c

Please sign in to comment.