kaneo (minimalist kanban) fork to experiment adding a tangled integration
github.com/usekaneo/kaneo
1import { eq } from "drizzle-orm";
2import { HTTPException } from "hono/http-exception";
3import db from "../../database";
4import { taskRelationTable } from "../../database/schema";
5
6async function deleteTaskRelation(id: string) {
7 const [relation] = await db
8 .delete(taskRelationTable)
9 .where(eq(taskRelationTable.id, id))
10 .returning();
11
12 if (!relation) {
13 throw new HTTPException(404, {
14 message: "Task relation not found",
15 });
16 }
17
18 return relation;
19}
20
21export default deleteTaskRelation;