limit sessions displayed to 20

This commit is contained in:
Barış Soner Uşaklı
2017-04-30 15:11:51 -04:00
parent 5b4dcfafe2
commit da24e342f2

View File

@@ -65,7 +65,7 @@ module.exports = function (User) {
}
async.waterfall([
async.apply(db.getSortedSetRevRange, 'uid:' + uid + ':sessions', 0, -1),
async.apply(db.getSortedSetRevRange, 'uid:' + uid + ':sessions', 0, 19),
function (sids, next) {
_sids = sids;
async.map(sids, db.sessionStore.get.bind(db.sessionStore), next);