day len server theo loi Khoi noi, toi xin tuyen bo mien tru trach nhiem
This commit is contained in:
@@ -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,
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user