mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 11:40:25 +00:00
Add cron to debugging buttons
This commit is contained in:
parent
03b5361be9
commit
8417e8fd62
3 changed files with 6 additions and 5 deletions
|
|
@ -509,7 +509,7 @@ ready(function(model) {
|
|||
value: expTally
|
||||
});
|
||||
};
|
||||
poormanscron = function() {
|
||||
exports.poormanscron = poormanscron = function() {
|
||||
var DAY, daysPassed, lastCron, today;
|
||||
model.setNull('_user.lastCron', new Date());
|
||||
lastCron = new Date(new Date(model.get('_user.lastCron')).toDateString());
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ ready (model) ->
|
|||
|
||||
|
||||
#TODO: remove when cron implemented
|
||||
poormanscron = ->
|
||||
exports.poormanscron = poormanscron = ->
|
||||
model.setNull('_user.lastCron', new Date())
|
||||
lastCron = new Date(new Date(model.get('_user.lastCron')).toDateString()) # calculate as midnight
|
||||
today = new Date(new Date().toDateString()) # calculate as midnight
|
||||
|
|
|
|||
|
|
@ -65,9 +65,10 @@
|
|||
<div class="container-fluid">
|
||||
{#if _debug}
|
||||
<div class="alert">
|
||||
<i class="icon-warning-sign"></i> <b>Debug Buttons</b>
|
||||
<a x-bind=click:endOfDayTally class="btn">Run Cron</a>
|
||||
<a x-bind=click:loadDebugDefaults class="btn">Debuggin Defaults</a>
|
||||
<i class="icon-warning-sign"></i> <b>Debugging Options</b>
|
||||
<a x-bind=click:poormanscron class="btn">Cron</a>
|
||||
<a x-bind=click:endOfDayTally class="btn">Tally</a>
|
||||
<a x-bind=click:loadDebugDefaults class="btn">Tyler Defaults</a>
|
||||
</div>
|
||||
{/}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue