bug fixed
This commit is contained in:
parent
79bf67f879
commit
c0bca32462
|
@ -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` });
|
||||||
|
|
||||||
|
|
Ŝarĝante…
Reference in New Issue