fix sorting on users/map

This commit is contained in:
barisusakli
2015-07-24 13:58:40 -04:00
parent 791e0893ab
commit 26a9530686

View File

@@ -175,7 +175,7 @@ usersController.getMap = function(req, res, next) {
});
}, function(err, data) {
data.sort(function(a, b) {
return b.total - a.total;
return b.users.length - a.users.length;
});
data.forEach(function(room) {