use '-inf'/'+inf'

This commit is contained in:
barisusakli
2016-03-11 14:20:23 +02:00
parent 4b531cb655
commit b0151502c2
5 changed files with 18 additions and 10 deletions

View File

@@ -86,7 +86,7 @@ module.exports = function(Categories) {
db.getSortedSetRevRangeByScore('cid:' + category.cid + ':tids', 0, -1, '+inf', Date.now(), next);
},
tids: function(next) {
db.getSortedSetRevRangeByScore('cid:' + category.cid + ':tids', 0, Math.max(1, count), Date.now(), 0, next);
db.getSortedSetRevRangeByScore('cid:' + category.cid + ':tids', 0, Math.max(1, count), Date.now(), '-inf', next);
}
}, function(err, results) {
if (err) {