day len server theo loi Khoi noi, toi xin tuyen bo mien tru trach nhiem

This commit is contained in:
2024-11-05 15:02:53 +07:00
parent 0f68b51d75
commit 56ba2808c8
22 changed files with 482 additions and 63 deletions

View File

@@ -117,7 +117,7 @@ export class ResumeSchema extends PothosSchema {
const resumes = await this.prisma.resume.findMany({
...query,
where: {
userId: ctx.http.me.id,
userId: ctx.http.me?.id ?? '',
status: args.status ?? undefined,
},
})
@@ -274,7 +274,7 @@ export class ResumeSchema extends PothosSchema {
if (ctx.isSubscription) {
throw new Error('Not allowed')
}
if (ctx.http.me.role !== Role.MODERATOR) {
if (ctx.http.me?.role !== Role.MODERATOR) {
throw new Error('Not allowed')
}
const { resumeId, status, adminNote } = args
@@ -315,7 +315,7 @@ export class ResumeSchema extends PothosSchema {
_adminNote = await tx.adminNote.create({
data: {
content: adminNote,
notedByUserId: ctx.http.me.id,
notedByUserId: ctx.http.me?.id ?? '',
resumeId,
},
})