mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 15:38:59 +00:00
reset perkMonthCount when subscription ends
This commit is contained in:
parent
6ee2e3a379
commit
3203b09b7a
1 changed files with 2 additions and 0 deletions
|
|
@ -279,6 +279,8 @@ export async function cron (options = {}) {
|
|||
|
||||
if (user.isSubscribed()) {
|
||||
await grantEndOfTheMonthPerks(user, now);
|
||||
} if (!user.isSubscribed() && user.purchased.plan.perkMonthCount > 0) {
|
||||
user.purchased.plan.perkMonthCount = 0;
|
||||
}
|
||||
|
||||
const { plan } = user.purchased;
|
||||
|
|
|
|||
Loading…
Reference in a new issue