From d13a97f97902e847d1e8e75e520f6c009fef8238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Wed, 25 Sep 2024 21:44:05 +0200 Subject: [PATCH] fix(credit_billing): allow spending of exact credits --- apps/api/src/services/billing/credit_billing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/services/billing/credit_billing.ts b/apps/api/src/services/billing/credit_billing.ts index 6fa3490..56de74e 100644 --- a/apps/api/src/services/billing/credit_billing.ts +++ b/apps/api/src/services/billing/credit_billing.ts @@ -63,7 +63,7 @@ export async function supaCheckTeamCredits(chunk: AuthCreditUsageChunk, team_id: const creditUsagePercentage = creditsWillBeUsed / chunk.price_credits; // Compare the adjusted total credits used with the credits allowed by the plan - if (creditsWillBeUsed >= chunk.price_credits) { + if (creditsWillBeUsed > chunk.price_credits) { sendNotification( team_id, NotificationType.LIMIT_REACHED,