add: added constraints do the db and removed useless db deletions

This commit is contained in:
Lukian 2025-04-28 11:12:07 +02:00
parent bd29608010
commit 05dd75fa74
3 changed files with 121 additions and 5 deletions

View file

@ -84,8 +84,6 @@ router.post('/:username/delete', checkAuth, async (req, res) => {
fs.unlinkSync(path.join(__dirname, `../data/pfps/${userToDelete[0].pfp}`));
}
await deleteUserMentions(connection, userToDelete[0].id);
await deleteUserMessages(connection, userToDelete[0].id);
await deleteUser(connection, userToDelete[0].id);
connection.end();