cascade on superuser delete

This commit is contained in:
Alex Holliday committed 2025-06-24 12:07:02 +08:00
1 parent 1cc9f4e4d9
commit 40f4294cae
3 files changed
+25 -7

No files matched your search

-7
View File
@@ -423,13 +423,6 @@ class AuthController {
await this.jobQueue.deleteJob(monitor);
})
));
// 3. Delete team
await this.db.deleteTeam(user.teamId);
// 4. Delete all other team members
await this.db.deleteAllOtherUsers();
// 5. Delete each monitor
await this.db.deleteMonitorsByUserId(user._id);
}
// 6. Delete the user by id
await this.db.deleteUser(user._id);