From 5fc0fe28e45882da0fab635e839a2977104d2f46 Mon Sep 17 00:00:00 2001 From: Maxim Filippov Date: Mon, 17 Dec 2018 02:26:40 +0300 Subject: [PATCH] Add temporary redirects --- src/boot/routes.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/boot/routes.js b/src/boot/routes.js index 2a08934f..839dda73 100644 --- a/src/boot/routes.js +++ b/src/boot/routes.js @@ -26,6 +26,29 @@ export default (store) => { { name: 'public-external-timeline', path: '/~/main/all', component: PublicAndExternalTimeline }, { name: 'public-timeline', path: '/~/main/public', component: PublicTimeline }, { name: 'friends', path: '/~/main/friends', component: FriendsTimeline }, + // Beginning of temporary redirects + { path: '/main/:route', + redirect: to => { + const { params } = to + + return { path: `/~/main/${params.route}` } + } + }, + { path: '/tag/:tag', + redirect: to => { + const { params } = to + + return { path: `/~/tag/${params.tag}` } + } + }, + { path: '/notice/:id', + redirect: to => { + const { params } = to + + return { path: `/~/notice/${params.id}` } + } + }, + // End of temporary redirects { name: 'tag-timeline', path: '/~/tag/:tag', component: TagTimeline }, { name: 'conversation', path: '/~/notice/:id', component: ConversationPage, meta: { dontScroll: true } }, { name: 'user-profile', path: '/:name', component: UserProfile },