fix: Correct set cron debug function

This commit is contained in:
Blade Barringer
2016-05-14 22:30:32 -05:00
parent 3b8ce8451b
commit bc58bd97bb
2 changed files with 17 additions and 4 deletions

View File

@@ -78,12 +78,10 @@ function($scope, $rootScope, User, $http, Notification, ApiUrl, Social) {
});
};
//@TODO: Route?
$scope.addMissedDay = function(numberOfDays){
if (!confirm("Are you sure you want to reset the day by " + numberOfDays + " day(s)?")) return;
var dayBefore = moment(User.user.lastCron).subtract(numberOfDays, 'days').toDate();
User.set({'lastCron': dayBefore});
Notification.text('-' + numberOfDays + ' day(s), remember to refresh');
User.setCron(numberOfDays);
};
$scope.addTenGems = function(){