mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-16 11:11:43 +00:00
Fix issue with gift sub processing
This commit is contained in:
parent
ff0bb9d005
commit
edc3c58876
1 changed files with 6 additions and 2 deletions
|
|
@ -112,8 +112,12 @@ async function grantEndOfTheMonthPerks (user, now) {
|
|||
// (subtract 1 because we should have run this when the payment was taken last month)
|
||||
plan.consecutive.offset = planMonthsLength - 1;
|
||||
}
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await plan.incrementPerkCounterAndReward(user._id, planMonthsLength);
|
||||
if (!plan.gift) {
|
||||
// Don't process gifted subs here, since they already got their perks.
|
||||
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await plan.incrementPerkCounterAndReward(user._id, planMonthsLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue