bug fixed
This commit is contained in:
@@ -81,6 +81,12 @@ export default async function deleteUserById(
|
|||||||
where: { userId },
|
where: { userId },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await prisma.usersAndCollections.deleteMany({
|
||||||
|
where: {
|
||||||
|
OR: [{ userId: userId }, { collection: { ownerId: userId } }],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
// Delete user's avatar
|
// Delete user's avatar
|
||||||
await removeFile({ filePath: `uploads/avatar/${userId}.jpg` });
|
await removeFile({ filePath: `uploads/avatar/${userId}.jpg` });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user