From 720a429115bdc5b70ff0c9c2b0746e5158f85d45 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 21 Jan 2025 13:23:34 -0300 Subject: [PATCH] Nick: temp fix --- apps/api/src/services/billing/auto_charge.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/api/src/services/billing/auto_charge.ts b/apps/api/src/services/billing/auto_charge.ts index 45fdf1f5..7a8a96ca 100644 --- a/apps/api/src/services/billing/auto_charge.ts +++ b/apps/api/src/services/billing/auto_charge.ts @@ -32,6 +32,15 @@ export async function autoCharge( const resource = `auto-recharge:${chunk.team_id}`; const cooldownKey = `auto-recharge-cooldown:${chunk.team_id}`; + if(chunk.team_id === "285bb597-6eaf-4b96-801c-51461fc3c543"){ + return { + success: false, + message: "Auto-recharge failed", + remainingCredits: chunk.remaining_credits, + chunk, + }; + } + try { // Check if the team is in the cooldown period // Another check to prevent race conditions, double charging - cool down of 5 minutes