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.
This commit is contained in:
2024-12-09 17:55:09 +07:00
parent 269563555f
commit 5ab89d5cfa

View File

@@ -172,7 +172,7 @@ export class QuizSchema extends PothosSchema {
...query,
where: {
serviceId: args.serviceId,
centerMentorId: ctx.http.me.id,
centerMentorId: centerMentor.mentorId,
},
})
},