mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
Update credit_billing.ts
This commit is contained in:
parent
48c665519e
commit
fbdfa1256b
|
@ -308,7 +308,7 @@ export async function supaCheckTeamCredits(team_id: string, credits: number) {
|
|||
}
|
||||
|
||||
// 5. Compare the total credits used with the credits allowed by the plan.
|
||||
if (totalCreditsUsed > FREE_CREDITS) {
|
||||
if (totalCreditsUsed >= FREE_CREDITS) {
|
||||
// Send email notification for insufficient credits
|
||||
await sendNotification(
|
||||
team_id,
|
||||
|
@ -405,7 +405,7 @@ export async function supaCheckTeamCredits(team_id: string, credits: number) {
|
|||
const creditUsagePercentage = adjustedCreditsUsed / creditLimit;
|
||||
|
||||
// Compare the adjusted total credits used with the credits allowed by the plan
|
||||
if (adjustedCreditsUsed > price.credits) {
|
||||
if (adjustedCreditsUsed >= price.credits) {
|
||||
await sendNotification(
|
||||
team_id,
|
||||
NotificationType.LIMIT_REACHED,
|
||||
|
|
Loading…
Reference in New Issue
Block a user