fix offset calculation

This commit is contained in:
Phillip Thelen
2023-02-17 15:42:31 +01:00
parent d69de2948b
commit 3f56b7fa3f
2 changed files with 17 additions and 2 deletions
@@ -255,7 +255,7 @@ async function createSubscription (data) {
// Block sub perks
if (months > 0 && (!data.gift || !isNewSubscription)) {
if (!data.gift && !groupId) {
plan.consecutive.offset = months;
plan.consecutive.offset = block.months;
}
await plan.incrementPerkCounterAndReward(recipient._id, months);
}