fix: cleanup drizzle refactor

This commit is contained in:
Henry
2025-04-24 22:53:22 +01:00
parent 0c3ab8b890
commit d40760d2ab
9 changed files with 47 additions and 33 deletions

View File

@@ -93,7 +93,7 @@ export const listRouter = createTRPCRouter({
code: "NOT_FOUND",
});
const result = await listRepo.reorder(ctx.db, {
const result = await listRepo.reorder(ctx.supabaseClient, {
boardPublicId: list.boardId,
listPublicId: list.id,
currentIndex: input.currentIndex,
@@ -142,7 +142,7 @@ export const listRouter = createTRPCRouter({
code: "NOT_FOUND",
});
const deletedAt = new Date().toISOString();
const deletedAt = new Date();
const deletedList = await listRepo.softDeleteById(ctx.db, {
listId: list.id,
@@ -176,7 +176,7 @@ export const listRouter = createTRPCRouter({
await activityRepo.bulkCreate(ctx.db, activities);
await listRepo.shiftIndex(ctx.db, {
await listRepo.shiftIndex(ctx.supabaseClient, {
boardId: list.boardId,
listIndex: list.index,
});
@@ -203,7 +203,7 @@ export const listRouter = createTRPCRouter({
.output(z.custom<Awaited<ReturnType<typeof listRepo.update>>>())
.mutation(async ({ ctx, input }) => {
const result = await listRepo.update(
ctx.db,
ctx.supabaseClient,
{ name: input.name },
{ listPublicId: input.listPublicId },
);