mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 23:42:12 +00:00
feat(archive_todo): Update batchUpdate
This is part 3 of habitrpg#3062. It makes batchUpdate look at the archived flag not the completed date Part 1: habitrpg/habitrpg#3302 Part 2: habirrpg/habitrpg-shared#198
This commit is contained in:
parent
16ac06c4c9
commit
601e94cb43
1 changed files with 1 additions and 1 deletions
|
|
@ -444,7 +444,7 @@ api.batchUpdate = function(req, res, next) {
|
|||
}else if(response.wasModified){
|
||||
// Preen 3-day past-completed To-Dos from Angular & mobile app
|
||||
response.todos = _.where(response.todos, function(t) {
|
||||
return !t.completed || (t.challenge && t.challenge.id) || moment(t.dateCompleted).isAfter(moment().subtract('days',3));
|
||||
return !t.completed || (t.challenge && t.challenge.id) || !t.archived;
|
||||
});
|
||||
res.json(200, response);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue