protectecProcedure
.input(z.object({
gradeId: z.string()
}))
.query(({ input: {gradeId}, ctx}) => {
const grade = prisma.grade.findById(gradeId)
if (result.studentId !== ctx.studentId) {
throw new Error()
}
})
protectecProcedure
.input(z.object({
gradeId: z.string()
}))
.query(({ input: {gradeId}, ctx}) => {
const grade = prisma.grade.findById(gradeId)
if (result.studentId !== ctx.studentId) {
throw new Error()
}
})