add +2 Missed Days to debug menu in footer, adjust addMissedDay function and all calls to it

This commit is contained in:
Alice Harris
2015-03-07 18:39:43 +10:00
parent cdc8ff6000
commit 044930b7d3
4 changed files with 8 additions and 6 deletions

View File

@@ -71,11 +71,11 @@ function($scope, $rootScope, User, $http, Notification, ApiUrl) {
'stats.hp': 1
});
}
$scope.addMissedDay = function(){
if (!confirm("Are you sure you want to reset the day?")) return;
var dayBefore = moment(User.user.lastCron).subtract(1, 'days').toDate();
$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('-1 day, remember to refresh');
Notification.text('-' + numberOfDays + ' day(s), remember to refresh');
}
$scope.addTenGems = function(){
$http.post(ApiUrl.get() + '/api/v2/user/addTenGems').success(function(){