pull ignored users from db

This commit is contained in:
Wyatt Johnson
2018-04-19 13:37:14 -06:00
parent 8e34fd1925
commit 68461308c6
+9
View File
@@ -111,6 +111,15 @@ const delUser = async (ctx, id) => {
.setOptions({ multi: true })
.remove();
// Remove the user from all other user's ignore lists.
await User.update(
{ ignoresUsers: user.id },
{
$pull: { ignoresUsers: user.id },
},
{ multi: true }
);
// For each comment that the user has authored, purge the comment data from it
// and unset their id from those comments.
await transformSingleWithCursor(