Fix mongoose query

This caused an "Invalid sort() argument." error when accessing groups.
This commit is contained in:
Thibaut Girka 2013-12-12 14:24:54 +01:00
parent ee1cd3c05d
commit f9489b3385

View file

@ -33,7 +33,7 @@ var populateQuery = function(type, q){
q.populate({
path: 'challenges',
select: challengeFields,
options: {sort: [['timestamp',-1]]}
options: {sort: {'timestamp': -1}}
});
return q;
}