Skip to content

Commit f09ff38

Browse files
committed
Redirect projects/v3/* to project/*
1 parent a0b7179 commit f09ff38

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { redirect, type LoaderFunctionArgs } from "@remix-run/server-runtime";
2+
3+
export const loader = async ({ request, params }: LoaderFunctionArgs) => {
4+
const organizationSlug = params.organizationSlug;
5+
const path = params["*"];
6+
7+
const url = new URL(request.url);
8+
url.pathname = `/orgs/${organizationSlug}/projects/${path}`;
9+
10+
return redirect(url.toString());
11+
};

0 commit comments

Comments
 (0)