feat: add redirect for old list routes

This commit is contained in:
Dominik Pschenitschni 2023-01-19 23:50:42 +01:00 committed by Gitea
parent 842f204123
commit af523cfcd7
1 changed files with 13 additions and 0 deletions

View File

@ -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',