mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 07:39:00 +08:00
Nick: removing credit notification for now
This commit is contained in:
parent
fa7dc5b10b
commit
3850b000f0
@ -317,21 +317,21 @@ export async function supaCheckTeamCredits(team_id: string, credits: number) {
|
|||||||
|
|
||||||
// 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 (adjustedCreditsUsed + credits > price.credits) {
|
if (adjustedCreditsUsed + credits > price.credits) {
|
||||||
await sendNotification(
|
// await sendNotification(
|
||||||
team_id,
|
// team_id,
|
||||||
NotificationType.LIMIT_REACHED,
|
// NotificationType.LIMIT_REACHED,
|
||||||
subscription.current_period_start,
|
// subscription.current_period_start,
|
||||||
subscription.current_period_end
|
// subscription.current_period_end
|
||||||
);
|
// );
|
||||||
return { success: false, message: "Insufficient credits, please upgrade!", remainingCredits: creditLimit - adjustedCreditsUsed };
|
return { success: false, message: "Insufficient credits, please upgrade!", remainingCredits: creditLimit - adjustedCreditsUsed };
|
||||||
} else if (creditUsagePercentage >= 0.8) {
|
} else if (creditUsagePercentage >= 0.8) {
|
||||||
// Send email notification for approaching credit limit
|
// Send email notification for approaching credit limit
|
||||||
await sendNotification(
|
// await sendNotification(
|
||||||
team_id,
|
// team_id,
|
||||||
NotificationType.APPROACHING_LIMIT,
|
// NotificationType.APPROACHING_LIMIT,
|
||||||
subscription.current_period_start,
|
// subscription.current_period_start,
|
||||||
subscription.current_period_end
|
// subscription.current_period_end
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
return { success: true, message: "Sufficient credits available", remainingCredits: creditLimit - adjustedCreditsUsed };
|
return { success: true, message: "Sufficient credits available", remainingCredits: creditLimit - adjustedCreditsUsed };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user