mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
getProjectByID
This commit is contained in:
@@ -30,9 +30,14 @@ export async function createProject(blob: string, name: string, owner: typeof Us
|
|||||||
return project;
|
return project;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getProjectByID(projectId: number) {
|
||||||
|
const [project] = await db.select().from(Project).where(eq(Project.id, projectId));
|
||||||
|
return project;
|
||||||
|
}
|
||||||
|
|
||||||
export async function getProjectByBlob(projectBlob: string) {
|
export async function getProjectByBlob(projectBlob: string) {
|
||||||
const [issue] = await db.select().from(Project).where(eq(Project.blob, projectBlob));
|
const [project] = await db.select().from(Project).where(eq(Project.blob, projectBlob));
|
||||||
return issue;
|
return project;
|
||||||
}
|
}
|
||||||
|
|
||||||
// issue related
|
// issue related
|
||||||
|
|||||||
Reference in New Issue
Block a user