From a0113dac3753725500d659f632bfe77a67e8e191 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Wed, 4 Sep 2024 16:54:20 -0300 Subject: [PATCH] Update credit_billing.ts --- apps/api/src/services/billing/credit_billing.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/api/src/services/billing/credit_billing.ts b/apps/api/src/services/billing/credit_billing.ts index 9ea0435e..53031de9 100644 --- a/apps/api/src/services/billing/credit_billing.ts +++ b/apps/api/src/services/billing/credit_billing.ts @@ -213,10 +213,8 @@ export async function supaCheckTeamCredits(team_id: string, credits: number) { // Cache the results for a minute, sub can be null and that's fine await setValue(cacheKeySubscription, JSON.stringify(subscription), 60); // Cache for 1 minute, even if null - - if (coupons) { - await setValue(cacheKeyCoupons, JSON.stringify(coupons), 60); // Cache for 1 minute - } + await setValue(cacheKeyCoupons, JSON.stringify(coupons), 60); // Cache for 1 minute + } let couponCredits = 0;