Only show leaderboard scores that round up to M$ 1 or more

This commit is contained in:
James Grugett 2022-02-10 14:51:14 -06:00
parent 9b50d67313
commit 00fbe711e5

View File

@ -116,7 +116,7 @@ async function toTopUsers(userScores: { [userId: string]: number }) {
const topUserPairs = _.take( const topUserPairs = _.take(
_.sortBy(Object.entries(userScores), ([_, score]) => -1 * score), _.sortBy(Object.entries(userScores), ([_, score]) => -1 * score),
10 10
).filter(([_, score]) => score > 0) ).filter(([_, score]) => score >= 0.5)
const topUsers = await Promise.all( const topUsers = await Promise.all(
topUserPairs.map(([userId]) => getUser(userId)) topUserPairs.map(([userId]) => getUser(userId))