Update user.schema.ts
This commit is contained in:
@@ -284,9 +284,15 @@ export class UserSchema extends PothosSchema {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const buffer = Buffer.concat(chunks)
|
const buffer = Buffer.concat(chunks)
|
||||||
await clerkClient.users.updateUserProfileImage(id, {
|
const { id: userId, imageUrl } = await clerkClient.users.updateUserProfileImage(id, {
|
||||||
file: new Blob([buffer]),
|
file: new Blob([buffer]),
|
||||||
})
|
});
|
||||||
|
await this.prisma.user.update({
|
||||||
|
where: { id: userId },
|
||||||
|
data: {
|
||||||
|
avatarUrl: imageUrl,
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user