mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-12 07:15:10 +00:00
api: be sure to flag user as modified if cron was run
This commit is contained in:
parent
df080c4368
commit
39dc60ade6
2 changed files with 6 additions and 5 deletions
|
|
@ -653,9 +653,10 @@ api.cron = function(req, res, next) {
|
|||
var user;
|
||||
user = res.locals.user;
|
||||
algos.cron(user);
|
||||
/*FIXME make sure the variable references got handled properly*/
|
||||
|
||||
return user.save(next);
|
||||
if (user.isModified()) {
|
||||
res.locals.wasModified = true;
|
||||
}
|
||||
user.save(next);
|
||||
};
|
||||
|
||||
api.revive = function(req, res, next) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
// Streak
|
||||
div(modal='modals.achievements.streak', header='Achievement!')
|
||||
div(modal='modals.achievements.streak')
|
||||
.modal-header
|
||||
h3 Achievement!
|
||||
.modal-body
|
||||
|
|
@ -10,7 +10,7 @@ div(modal='modals.achievements.streak', header='Achievement!')
|
|||
button.btn.btn-default.cancel(ng-click='modals.modals.streakAchievement = false') Cancel
|
||||
|
||||
// Max Gear
|
||||
div(modal='modals.achievements.maxGear', header='Achievement!')
|
||||
div(modal='modals.achievements.maxGear')
|
||||
.modal-header
|
||||
h3 Achievement!
|
||||
.modal-body
|
||||
|
|
|
|||
Loading…
Reference in a new issue