add clearCompletedTodos route with tests, add test for getting completed todos, misc fixes

This commit is contained in:
Matteo Pagliazzi
2016-01-25 17:23:01 +01:00
parent 4149cbf381
commit d5751837ed
5 changed files with 51 additions and 7 deletions

View File

@@ -34,7 +34,7 @@ export default function cronMiddleware (req, res, next) {
// Run cron
cron({user, tasksByType, now, daysMissed, analytics});
// Clean completed todos - 30 days for free users, 90 for subscribers
// Clear old completed todos - 30 days for free users, 90 for subscribers
// Do not delete challenges completed todos TODO unless the task is broken?
Task.remove({
userId: user._id,