code refactoring + many security/bug fixes

This commit is contained in:
daniel31x13
2023-11-06 08:25:57 -05:00
parent b5a28f68ad
commit c8edc3844b
48 changed files with 472 additions and 317 deletions
@@ -68,6 +68,11 @@ export default async function deleteUserById(
where: { ownerId: userId },
});
// Delete subscription
await prisma.subscription.delete({
where: { userId },
});
// Delete user's avatar
removeFile({ filePath: `uploads/avatar/${userId}.jpg` });