Update quiz.schema.ts
This commit is contained in:
@@ -211,13 +211,6 @@ export class QuizSchema extends PothosSchema {
|
||||
if (!centerMentor) {
|
||||
throw new Error('Center mentor not found')
|
||||
}
|
||||
if (args.scheduleId) {
|
||||
const schedule = await this.prisma.schedule.findUnique({
|
||||
where: { id: args.scheduleId },
|
||||
})
|
||||
if (!schedule) {
|
||||
throw new Error('Schedule not found')
|
||||
}
|
||||
return await this.prisma.quiz.findMany({
|
||||
...query,
|
||||
where: {
|
||||
@@ -226,8 +219,6 @@ export class QuizSchema extends PothosSchema {
|
||||
},
|
||||
})
|
||||
}
|
||||
throw new Error('Schedule ID is required')
|
||||
}
|
||||
},
|
||||
}),
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user