mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
v3 adapt v2: lint client only shared ops and enable members integration tests
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
import moment from 'moment';
|
||||
import _ from 'lodash';
|
||||
|
||||
/*
|
||||
Preen 3-day past-completed To-Dos from Angular & mobile app
|
||||
*/
|
||||
// TODO used only in v2 client
|
||||
|
||||
module.exports = function(tasks) {
|
||||
return _.filter(tasks, function(t) {
|
||||
return !t.completed || (t.challenge && t.challenge.id) || moment(t.dateCompleted).isAfter(moment().subtract({
|
||||
days: 3
|
||||
module.exports = function preenTodos (tasks) {
|
||||
return _.filter(tasks, (t) => {
|
||||
return !t.completed || t.challenge && t.challenge.id || moment(t.dateCompleted).isAfter(moment().subtract({
|
||||
days: 3,
|
||||
}));
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user