From b974d351aad9e93081f1db8da1cf4f05cc3e9079 Mon Sep 17 00:00:00 2001 From: Sebastian Webster Date: Tue, 12 Sep 2023 22:07:11 +1200 Subject: [PATCH] Fixed deleting account not working --- controllers/Temp.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/controllers/Temp.js b/controllers/Temp.js index d8c48d00..164a4974 100644 --- a/controllers/Temp.js +++ b/controllers/Temp.js @@ -5519,19 +5519,27 @@ class TempController { updateMany: { filter: {followers: userFound.secondId}, update: {$pull: {followers: userFound.secondId}} - }, + } + }, + { updateMany: { filter: {following: userFound.secondId}, update: {$pull: {following: userFound.secondId}} - }, + } + }, + { updateMany: { filter: {blockedAccounts: userFound.secondId}, update: {$pull: {blockedAccounts: userFound.secondId}} - }, + } + }, + { updateMany: { filter: {accountFollowRequests: userFound.secondId}, update: {$pull: {accountFollowRequests: userFound.secondId}} - }, + } + }, + { deleteOne: { filter: {_id: {$eq: userId}}, }