mirror of
https://github.com/hex248/sprint.git
synced 2026-02-09 02:33:02 +00:00
Project.blob -> Project.key
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user