mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-04 17:50:35 +08:00
fix(credit_billing): allow spending of exact credits
This commit is contained in:
parent
84bff8add8
commit
d13a97f979
@ -63,7 +63,7 @@ export async function supaCheckTeamCredits(chunk: AuthCreditUsageChunk, team_id:
|
|||||||
const creditUsagePercentage = creditsWillBeUsed / chunk.price_credits;
|
const creditUsagePercentage = creditsWillBeUsed / chunk.price_credits;
|
||||||
|
|
||||||
// Compare the adjusted total credits used with the credits allowed by the plan
|
// Compare the adjusted total credits used with the credits allowed by the plan
|
||||||
if (creditsWillBeUsed >= chunk.price_credits) {
|
if (creditsWillBeUsed > chunk.price_credits) {
|
||||||
sendNotification(
|
sendNotification(
|
||||||
team_id,
|
team_id,
|
||||||
NotificationType.LIMIT_REACHED,
|
NotificationType.LIMIT_REACHED,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user