Getting swtiching tiers to work

This commit is contained in:
Owen
2026-02-09 17:05:14 -08:00
committed by Owen Schwartz
parent b741306cc4
commit e252d6513b
7 changed files with 81 additions and 20 deletions

View File

@@ -206,7 +206,8 @@ export async function changeTier(
// Keep the existing item unchanged if we can't find it
return {
id: stripeItem.id,
price: stripeItem.price.id
price: stripeItem.price.id,
quantity: stripeItem.quantity
};
}
@@ -216,14 +217,16 @@ export async function changeTier(
if (newPriceId) {
return {
id: stripeItem.id,
price: newPriceId
price: newPriceId,
quantity: stripeItem.quantity
};
}
// If no mapping found, keep existing
return {
id: stripeItem.id,
price: stripeItem.price.id
price: stripeItem.price.id,
quantity: stripeItem.quantity
};
}
);