mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-14 07:52:15 +00:00
perf(hall): use $gt in contributors.level index instead of $ne:null for
better performance
This commit is contained in:
parent
2786b36206
commit
9b3814575e
1 changed files with 1 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ api.ensureAdmin = function(req, res, next) {
|
|||
}
|
||||
|
||||
api.getHeroes = function(req,res,next) {
|
||||
User.find({'contributor.level':{$ne:null}})// {$exists:true} causes terrible performance http://goo.gl/GCxzC9
|
||||
User.find({'contributor.level':{$gt:0}})
|
||||
.select('contributor backer balance profile.name')
|
||||
.sort('-contributor.level')
|
||||
.exec(function(err, users){
|
||||
|
|
|
|||
Loading…
Reference in a new issue