completed To-Dos: return the 30 most recent instead of 30 oldest (#7318)

This commit is contained in:
Alys
2016-05-17 16:13:47 +10:00
committed by Matteo Pagliazzi
parent 9f12acf241
commit 810e4cbd78
2 changed files with 3 additions and 3 deletions

View File

@@ -127,7 +127,7 @@ async function _getTasks (req, res, user, challenge) {
type: 'todo',
completed: true,
}).limit(30).sort({ // TODO add ability to pick more than 30 completed todos
dateCompleted: 1,
dateCompleted: -1,
});
} else {
query.type = type.slice(0, -1); // removing the final "s"