mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-01 07:21:15 +00:00
14 lines
337 B
CoffeeScript
14 lines
337 B
CoffeeScript
|
|
moment = require 'moment'
|
||
|
|
|
||
|
|
module.exports.app = (appExports, model) ->
|
||
|
|
user = model.at('_user')
|
||
|
|
|
||
|
|
appExports.emulateNextDay = ->
|
||
|
|
yesterday = +moment().subtract('days', 1).toDate()
|
||
|
|
user.set 'lastCron', yesterday
|
||
|
|
window.location.reload()
|
||
|
|
|
||
|
|
appExports.cheat = ->
|
||
|
|
user.incr 'stats.exp', 20
|
||
|
|
user.incr 'stats.gp', 1000
|