workers-site: redirect /apsg to APS org [deploy]

This commit is contained in:
Harsh Shandilya 2022-01-08 01:01:53 +05:30
parent a69d93fc56
commit 3165561d1e

View File

@ -89,7 +89,7 @@ async function redirectGitHub(event: FetchEvent): Promise<Response> {
case "apsg": case "apsg":
switch (urlParts.length) { switch (urlParts.length) {
case 1: case 1:
return Response.redirect(APS_GITHUB_URL, 301); return Response.redirect(`${GITHUB_URL}/${APS_SLUG}`, 301);
case 2: case 2:
return Response.redirect( return Response.redirect(
`${GITHUB_URL}/${APS_SLUG}/${urlParts[1]}`, `${GITHUB_URL}/${APS_SLUG}/${urlParts[1]}`,