From 5ab89d5cfafa48f4658c7b3ac73afc3d679b03fd Mon Sep 17 00:00:00 2001 From: Ly Tuan Kiet Date: Mon, 9 Dec 2024 17:55:09 +0700 Subject: [PATCH] fix: update centerMentorId reference in Quiz schema query - Changed the centerMentorId reference in the Quiz schema to use centerMentor.mentorId instead of the current user's ID. - This adjustment ensures that the correct mentor association is maintained in the query logic, enhancing data integrity and access control. --- src/Quiz/quiz.schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Quiz/quiz.schema.ts b/src/Quiz/quiz.schema.ts index d871c2b..62f8576 100644 --- a/src/Quiz/quiz.schema.ts +++ b/src/Quiz/quiz.schema.ts @@ -172,7 +172,7 @@ export class QuizSchema extends PothosSchema { ...query, where: { serviceId: args.serviceId, - centerMentorId: ctx.http.me.id, + centerMentorId: centerMentor.mentorId, }, }) },