From 213f85dc683245af57825181605cc41afc721820 Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 1 Jul 2021 17:05:13 -0500 Subject: delete players with no leaderboard positions from leaderboard collections --- build/database.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build/database.js') diff --git a/build/database.js b/build/database.js index c34222d..6edb29b 100644 --- a/build/database.js +++ b/build/database.js @@ -568,6 +568,8 @@ async function removeBadMemberLeaderboardAttributes() { await memberLeaderboardsCollection.updateMany(filter, { '$unset': unsetValue }); } } + await memberLeaderboardsCollection.deleteMany({ stats: {} }); + await profileLeaderboardsCollection.deleteMany({ stats: {} }); } exports.finishedCachingRawLeaderboards = false; /** Fetch all the leaderboards, used for caching. Don't call this often! */ -- cgit