Project.blob -> Project.key

This commit is contained in:
Oliver Bryan
2025-12-29 06:17:40 +00:00
parent 54493f7c60
commit f534bc6dec
16 changed files with 509 additions and 71 deletions

View File

@@ -1,12 +1,12 @@
import type { BunRequest } from "bun";
import { getIssuesWithAssigneeByProject, getProjectByBlob } from "../../db/queries";
import { getIssuesWithAssigneeByProject, getProjectByKey } from "../../db/queries";
export default async function issuesInProject(req: BunRequest<"/issues/:projectBlob">) {
const { projectBlob } = req.params;
export default async function issuesInProject(req: BunRequest<"/issues/:projectKey">) {
const { projectKey } = req.params;
const project = await getProjectByBlob(projectBlob);
const project = await getProjectByKey(projectKey);
if (!project) {
return new Response(`project not found: provided ${projectBlob}`, { status: 404 });
return new Response(`project not found: provided ${projectKey}`, { status: 404 });
}
const issues = await getIssuesWithAssigneeByProject(project.id);