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 /src/database.ts | |
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 'src/database.ts')
-rw-r--r-- | src/database.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/database.ts b/src/database.ts index 5d15954..d074c60 100644 --- a/src/database.ts +++ b/src/database.ts @@ -725,6 +725,14 @@ async function removeBadMemberLeaderboardAttributes(): Promise<void> { ) } } + + await memberLeaderboardsCollection.deleteMany( + { stats: {} } + ) + await profileLeaderboardsCollection.deleteMany( + { stats: {} } + ) + } export let finishedCachingRawLeaderboards = false |