feat: Delete cards

This commit is contained in:
Henry
2023-12-15 10:50:19 +00:00
parent 980cbe3e5a
commit 54e542b5b8
10 changed files with 693 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
import { z } from "zod";
import { eq, asc } from "drizzle-orm";
import { eq, asc, isNull } from "drizzle-orm";
import { boards, cards, lists } from "~/server/db/schema";
import { generateUID } from "~/utils/generateUID";
@@ -43,6 +43,7 @@ export const boardRouter = createTRPCRouter({
},
with: {
cards: {
where: isNull(cards.deletedAt),
orderBy: [asc(cards.index)],
columns: {
publicId: true,