fix some errors

This commit is contained in:
miloschwartz
2026-02-09 20:23:55 -08:00
parent ba5ae6ed04
commit ed40eae655
4 changed files with 12 additions and 46 deletions

View File

@@ -45,7 +45,7 @@ export function verifyValidSubscription(tiers: Tier[]) {
}
const { tier, active } = await getOrgTierData(orgId);
const isTier = tiers.includes(tier || "");
const isTier = tiers.includes(tier as Tier);
if (!active) {
return next(
createHttpError(

View File

@@ -90,7 +90,7 @@ export async function handleSubscriptionUpdated(
const itemsToUpsert = fullSubscription.items.data.map((item) => {
// Try to get featureId from price
let featureId: string | null = getFeatureIdByPriceId(item.price.id) || null;
// If no match, try to preserve existing featureId
if (!featureId) {
const existingItem = existingItems.find(