Merge branch 'gsf' into subs-private

This commit is contained in:
Sabe Jones 2024-04-17 09:05:36 -05:00
commit f2a2d4cde5

View file

@ -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);
}
}
}
}