day len server theo loi Khoi noi, toi xin tuyen bo mien tru trach nhiem
This commit is contained in:
@@ -142,7 +142,7 @@ export class CenterMentorSchema extends PothosSchema {
|
||||
throw new Error('Not allowed')
|
||||
}
|
||||
// get centerId by user id from context
|
||||
const userId = ctx.http.me.id
|
||||
const userId = ctx.http.me?.id
|
||||
if (!userId) {
|
||||
throw new Error('User ID is required')
|
||||
}
|
||||
@@ -266,7 +266,7 @@ export class CenterMentorSchema extends PothosSchema {
|
||||
data: {
|
||||
content: args.adminNote ?? '',
|
||||
mentorId: mentor.id,
|
||||
notedByUserId: ctx.http.me.id,
|
||||
notedByUserId: ctx.http.me?.id ?? '',
|
||||
},
|
||||
})
|
||||
// update user role
|
||||
@@ -312,7 +312,7 @@ export class CenterMentorSchema extends PothosSchema {
|
||||
adminNote: {
|
||||
create: {
|
||||
content: args.adminNote ?? '',
|
||||
notedByUserId: ctx.http.me.id,
|
||||
notedByUserId: ctx.http.me?.id ?? '',
|
||||
updatedAt: new Date(),
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user