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