Skip to content

Commit 058a588

Browse files
chore: rename matcher and param
1 parent efc8c3e commit 058a588

File tree

10 files changed

+4
-4
lines changed

10 files changed

+4
-4
lines changed

src/params/pid.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function match(param: string) {
2+
return param === "pull" || param === "issues" || param === "discussion";
3+
}

src/params/poi.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/routes/[pullOrIssue=poi]/[org]/[repo]/[id=number]/+page.server.ts renamed to src/routes/[pid=pid]/[org]/[repo]/[id=number]/+page.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { error, redirect } from "@sveltejs/kit";
22
import { gitHubCache } from "$lib/server/github-cache";
33

44
export async function load({ params }) {
5-
const { pullOrIssue: type, org, repo, id } = params;
5+
const { pid: type, org, repo, id } = params;
66
const numId = +id; // id is already validated by the route matcher
77

88
const item = await gitHubCache.getItemDetails(org, repo, numId);

0 commit comments

Comments
 (0)