diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2021-03-01 20:40:36 -0600 |
---|---|---|
committer | mat <27899617+mat-1@users.noreply.github.com> | 2021-03-01 20:40:36 -0600 |
commit | 7a486de4e902faa3bad201e83434e008cb3714b7 (patch) | |
tree | 928820952ad530bbe430a3e4176ea0be600a46a5 /build | |
parent | 0aa75f8391a3dd112b1aa6cf0278fdd0121985f5 (diff) | |
download | skyblock-api-7a486de4e902faa3bad201e83434e008cb3714b7.tar.gz skyblock-api-7a486de4e902faa3bad201e83434e008cb3714b7.tar.bz2 skyblock-api-7a486de4e902faa3bad201e83434e008cb3714b7.zip |
Update database.js
Diffstat (limited to 'build')
-rw-r--r-- | build/database.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/build/database.js b/build/database.js index 45bde6e..08bbb22 100644 --- a/build/database.js +++ b/build/database.js @@ -263,9 +263,11 @@ async function removeBadMemberLeaderboardAttributes() { unsetValue[leaderboard] = ''; const filter = {}; const requirement = await getMemberLeaderboardRequirement(leaderboard); + const leaderboardReversed = isLeaderboardReversed(leaderboard); if (requirement !== null) { filter[`stats.${leaderboard}`] = { - '$lt': requirement + '$lt': leaderboardReversed ? undefined : requirement, + '$gt': leaderboardReversed ? requirement : undefined }; await memberLeaderboardsCollection.updateMany(filter, { '$unset': unsetValue }); } |