mirror of
https://github.com/hex248/sprint.git
synced 2026-02-07 18:23:03 +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;
|
||||
}
|
||||
|
||||
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) {
|
||||
const [issue] = await db.select().from(Project).where(eq(Project.blob, projectBlob));
|
||||
return issue;
|
||||
const [project] = await db.select().from(Project).where(eq(Project.blob, projectBlob));
|
||||
return project;
|
||||
}
|
||||
|
||||
// issue related
|
||||
|
||||
Reference in New Issue
Block a user