Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Update credit_billing.ts
Nicolas821c62c5750d
diff --git a/apps/api/src/services/billing/credit_billing.ts b/apps/api/src/services/billing/credit_billing.tsindex 39e9f15e9..694d0e5c6 100644--- a/apps/api/src/services/billing/credit_billing.ts+++ b/apps/api/src/services/billing/credit_billing.ts@@ -55,7 +55,7 @@ export async function supaCheckTeamCredits(chunk: AuthCreditUsageChunk, team_id:const creditsWillBeUsed = chunk.adjusted_credits_used + credits;- // In case chunk.price_credits is undefined, set it to a large number to avoid division by zero+ // In case chunk.price_credits is undefined, set it to a large number to avoid mistakesconst totalPriceCredits = chunk.price_credits ?? 100000000;// Removal of + creditsconst creditUsagePercentage = creditsWillBeUsed / totalPriceCredits;