diff options
| author | mat <github@matdoes.dev> | 2021-07-01 17:05:13 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2021-07-01 17:05:13 -0500 |
| commit | 213f85dc683245af57825181605cc41afc721820 (patch) | |
| tree | 080c40a041f68c6937071d3fe9ab28f0501545ad /build | |
| parent | 03991ab4890202dcfd5415da66773638245dccf1 (diff) | |
| download | skyblock-api-213f85dc683245af57825181605cc41afc721820.tar.gz skyblock-api-213f85dc683245af57825181605cc41afc721820.tar.bz2 skyblock-api-213f85dc683245af57825181605cc41afc721820.zip | |
delete players with no leaderboard positions from leaderboard collections
Diffstat (limited to 'build')
| -rw-r--r-- | build/database.js | 2 |
1 files changed, 2 insertions, 0 deletions
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! */ |
