From d48e6b4a2823d194fa15b3d120c0ffc721560450 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:11:24 +0700 Subject: [PATCH] feat: only include user task status of the user --- src/controllers/07-task-controller.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/07-task-controller.ts b/src/controllers/07-task-controller.ts index bc2ede2..85a57bd 100644 --- a/src/controllers/07-task-controller.ts +++ b/src/controllers/07-task-controller.ts @@ -633,7 +633,9 @@ export class UserTaskController extends Controller { prisma.taskOrder.findMany({ where, include: { - userTask: true, + userTask: { + where: { userId: req.user.sub }, + }, institution: true, createdBy: true, },