feat(admin): redirect /admin/{orders,stops,products} to /v2
This commit is contained in:
+9
-6
@@ -110,12 +110,15 @@ const nextConfig: NextConfig = {
|
|||||||
// Redirects
|
// Redirects
|
||||||
async redirects() {
|
async redirects() {
|
||||||
return [
|
return [
|
||||||
// Redirect old paths if needed
|
// Cutover (PR 6, Task 6.1): mobile-first admin lives at /admin/v2/*.
|
||||||
// {
|
// Redirect the v1 list/detail paths to their v2 equivalents.
|
||||||
// source: '/old-path',
|
// Use `permanent: false` (307) so we can revert easily if a
|
||||||
// destination: '/new-path',
|
// regression is caught in monitoring before the v1 files are
|
||||||
// permanent: true,
|
// removed in Task 6.2.
|
||||||
// },
|
{ source: "/admin/orders", destination: "/admin/v2/orders", permanent: false },
|
||||||
|
{ source: "/admin/orders/:id", destination: "/admin/v2/orders/:id", permanent: false },
|
||||||
|
{ source: "/admin/stops", destination: "/admin/v2/stops", permanent: false },
|
||||||
|
{ source: "/admin/products", destination: "/admin/v2/products", permanent: false },
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user