From c9a492e4e9614047c945e535b873ee0dc687793c Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Thu, 19 Jan 2023 23:50:42 +0100 Subject: [PATCH] feat: add redirect for old list routes --- src/router/index.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/router/index.ts b/src/router/index.ts index 6a2a30346..542ec3249 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -268,6 +268,19 @@ const router = createRouter({ showOverdue: route.query.showOverdue === 'true', }), }, + { + // Redirect old list routes to the respective project routes + // see: https://router.vuejs.org/guide/essentials/dynamic-matching.html#catch-all-404-not-found-route + path: '/lists:pathMatch(.*)*', + name: 'lists', + redirect(to) { + return { + path: to.path.replace('/lists', '/projects'), + query: to.query, + hash: to.hash, + } + }, + }, { path: '/projects/new/:namespaceId/', name: 'project.create',