[#1829] sort challenge-box by creation date

This commit is contained in:
Tyler Renelle
2013-11-15 21:32:25 -08:00
parent b9d3b3a1a7
commit 4fa4519b34
2 changed files with 9 additions and 3 deletions
+5 -1
View File
@@ -33,7 +33,11 @@ var populateQuery = function(type, q){
else
q.populate(guildPopulate);
q.populate('invites', nameFields);
q.populate('challenges', challengeFields);
q.populate({
path: 'challenges',
select: challengeFields,
options: {sort: [['timestamp',-1]]}
});
return q;
}