Answer the question
In order to leave comments, you need to log in
How to speed up this feature?
There is a function to find a user in the top players (if not included in the top 10)
async function getPlaceInRating_by_winnings(id) {
const Place = await UserModel.find({}, { id: 1 })
.sort({ totalWin: -1 })
return Place.findIndex((u) => u.id == id) + 1;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question