fix: correct number of available completed todos for users (#15424)

* fix: Correct number of available completed todos for users

* fix(test): remove test obsoleted by changes to GET completed

---------

Co-authored-by: Kalista Payne <sabrecat@gmail.com>
This commit is contained in:
Natalie
2025-04-17 13:34:55 -04:00
committed by GitHub
parent dd6503d5ef
commit d6e03c765e
2 changed files with 1 additions and 33 deletions

View File

@@ -207,11 +207,7 @@ async function getTasks (req, res, options = {}) {
query.type = 'todo';
query.completed = false; // Exclude completed todos
} else if (type === 'completedTodos' || type === '_allCompletedTodos') { // _allCompletedTodos is currently in BETA and is likely to be removed in future
limit = 30;
if (type === '_allCompletedTodos') {
limit = 0; // no limit
}
limit = 0; // no limit, the 30/90 days of data for subscribers is handled during cron
query.type = 'todo';
query.completed = true;