fix: Tasks API - map assigneeId query param to assignedToId schema field
Some checks are pending
Test / backend-test (push) Waiting to run
Test / frontend-test (push) Waiting to run

Root cause: Prisma schema uses 'assignedToId' but getTasks was passing
'assigneeId' directly to the where clause, causing PrismaClientValidationError
This commit is contained in:
fullsizemalt 2025-12-27 13:56:54 -08:00
parent 22ed334fb3
commit 820d345a0c

View file

@ -8,7 +8,7 @@ export const getTasks = async (request: FastifyRequest, reply: FastifyReply) =>
const tasks = await request.server.prisma.task.findMany({ const tasks = await request.server.prisma.task.findMany({
where: { where: {
...(status && { status }), ...(status && { status }),
...(assigneeId && { assigneeId }), ...(assigneeId && { assignedToId: assigneeId }),
...(roomId && { roomId }), ...(roomId && { roomId }),
...(batchId && { batchId }), ...(batchId && { batchId }),
...(startDate && endDate && { ...(startDate && endDate && {