mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
completed To-Dos: return the 30 most recent instead of 30 oldest (#7318)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user