fix(moment): fix deprecated warnings, use updated moment syntax

This commit is contained in:
Tyler Renelle 2014-10-08 17:36:54 -06:00
parent 96b41448cd
commit 2a8128872d
2 changed files with 2 additions and 2 deletions

View file

@ -108,7 +108,7 @@ function cancelSubscription(user, data){
if(isProduction) emailUser(user, 'cancel-subscription');
user.purchased.plan.dateTerminated =
moment( now.format('MM') + '/' + moment(du).format('DD') + '/' + now.format('YYYY') )
.add(1, 'month')
.add({months:1})
.toDate();
ga.event('unsubscribe', 'Stripe').send();

View file

@ -477,7 +477,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) || moment(t.dateCompleted).isAfter(moment().subtract({days:3}));
});
res.json(200, response);