edit + delete capabilities for org, project, sprint

This commit is contained in:
Oliver Bryan
2026-01-18 22:30:41 +00:00
parent e4bc1ea568
commit 303541e656
32 changed files with 1640 additions and 748 deletions

View File

@@ -1,4 +1,4 @@
import { Issue, Organisation, Project, User } from "@sprint/shared";
import { Issue, Organisation, Project, Sprint, User } from "@sprint/shared";
import { eq } from "drizzle-orm";
import { db } from "../client";
@@ -26,6 +26,8 @@ export async function updateProject(
export async function deleteProject(projectId: number) {
// delete all of the project's issues first
await db.delete(Issue).where(eq(Issue.projectId, projectId));
// delete all of the project's sprints
await db.delete(Sprint).where(eq(Sprint.projectId, projectId));
// delete actual project
await db.delete(Project).where(eq(Project.id, projectId));
}