mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
fix(moment): fix deprecated warnings, use updated moment syntax
This commit is contained in:
parent
96b41448cd
commit
2a8128872d
2 changed files with 2 additions and 2 deletions
|
|
@ -108,7 +108,7 @@ function cancelSubscription(user, data){
|
||||||
if(isProduction) emailUser(user, 'cancel-subscription');
|
if(isProduction) emailUser(user, 'cancel-subscription');
|
||||||
user.purchased.plan.dateTerminated =
|
user.purchased.plan.dateTerminated =
|
||||||
moment( now.format('MM') + '/' + moment(du).format('DD') + '/' + now.format('YYYY') )
|
moment( now.format('MM') + '/' + moment(du).format('DD') + '/' + now.format('YYYY') )
|
||||||
.add(1, 'month')
|
.add({months:1})
|
||||||
.toDate();
|
.toDate();
|
||||||
ga.event('unsubscribe', 'Stripe').send();
|
ga.event('unsubscribe', 'Stripe').send();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -477,7 +477,7 @@ api.batchUpdate = function(req, res, next) {
|
||||||
}else if(response.wasModified){
|
}else if(response.wasModified){
|
||||||
// Preen 3-day past-completed To-Dos from Angular & mobile app
|
// Preen 3-day past-completed To-Dos from Angular & mobile app
|
||||||
response.todos = _.where(response.todos, function(t) {
|
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) || moment(t.dateCompleted).isAfter(moment().subtract({days:3}));
|
||||||
});
|
});
|
||||||
res.json(200, response);
|
res.json(200, response);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue