fix hourglass count

This commit is contained in:
Phillip Thelen
2024-09-25 17:48:54 +02:00
committed by Kalista Payne
parent cd752fbdce
commit 6e2c8eeb64
@@ -260,9 +260,9 @@ async function createSubscription (data) {
recipient.purchased.plan.hourglassPromoReceived = new Date();
if (months !== block.months) {
// user is upgrading their sub. Already got one hourglass when subscribing
await plan.updateHourglasses(recipient._id, 11, '12_month_subscription');
} else {
await plan.updateHourglasses(recipient._id, 12, '12_month_subscription');
} else {
await plan.updateHourglasses(recipient._id, 13, '12_month_subscription');
}
} else if (!data.gift || (data.gift && isNewSubscription)) {
await plan.updateHourglasses(recipient._id, 1, 'subscribed');