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
This commit is contained in:
parent
22ed334fb3
commit
820d345a0c
1 changed files with 1 additions and 1 deletions
|
|
@ -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 && {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue