From 820d345a0ce7d1f85f0c0be1ee0936bebc6a3841 Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Sat, 27 Dec 2025 13:56:54 -0800 Subject: [PATCH] fix: Tasks API - map assigneeId query param to assignedToId schema field Root cause: Prisma schema uses 'assignedToId' but getTasks was passing 'assigneeId' directly to the where clause, causing PrismaClientValidationError --- backend/src/controllers/tasks.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/controllers/tasks.controller.ts b/backend/src/controllers/tasks.controller.ts index a2328ae..4b3e9d9 100644 --- a/backend/src/controllers/tasks.controller.ts +++ b/backend/src/controllers/tasks.controller.ts @@ -8,7 +8,7 @@ export const getTasks = async (request: FastifyRequest, reply: FastifyReply) => const tasks = await request.server.prisma.task.findMany({ where: { ...(status && { status }), - ...(assigneeId && { assigneeId }), + ...(assigneeId && { assignedToId: assigneeId }), ...(roomId && { roomId }), ...(batchId && { batchId }), ...(startDate && endDate && {