Finish refactoring auth slice, fixed several bugs
This commit is contained in:
1 parent
46bd317760
commit
6d99002fd1
6 files changed
+59
-22
No files matched your search
@@ -450,6 +450,8 @@ const deleteUserController = async (req, res, next) => {
|
||||
}
|
||||
|
||||
// 1. Find all the monitors associated with the user id
|
||||
console.log("wtf");
|
||||
|
||||
const monitors = await req.db.getMonitorsByUserId({
|
||||
params: { userId: _id },
|
||||
});
|
||||
@@ -459,6 +461,7 @@ const deleteUserController = async (req, res, next) => {
|
||||
await Promise.all(
|
||||
monitors.map(async (monitor) => {
|
||||
await req.jobQueue.deleteJob(monitor);
|
||||
|
||||
await req.db.deleteChecks(monitor._id);
|
||||
await req.db.deleteAlertByMonitorId(monitor._id);
|
||||
await req.db.deletePageSpeedChecksByMonitorId(monitor._id);
|
||||
|
||||
Reference in new issue
Block a user