Skip to content

Commit

Permalink
add /source redirect endpoint for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanThatOneKid committed Oct 22, 2023
1 parent eb5f757 commit bcbf922
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions lib/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,27 @@ export function makeAPIRouter(
webhookToken,
),
)
.get(
new URLPattern({ pathname: "/invite" }),
() =>
Promise.resolve(
Response.redirect(makeInviteURL(discordApplicationID)),
),
)
.get(
new URLPattern({ pathname: "/source" }),
() =>
Promise.resolve(
Response.redirect("https://github.com/acmcsufoss/lc-dailies"),
),
)
.get(
new URLPattern({ pathname: "/seasons" }),
makeSeasonsGetHandler(leaderboardClient),
)
.get(
new URLPattern({ pathname: "/seasons/:season_id" }),
makeSeasonGetHandler(leaderboardClient),
)
.get(
new URLPattern({ pathname: "/invite" }),
() =>
Promise.resolve(
Response.redirect(makeInviteURL(discordApplicationID)),
),
);
}

Expand Down

0 comments on commit bcbf922

Please sign in to comment.