From 7b055120548dd6589c742b569963981c1508215a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Thu, 6 Mar 2025 21:30:57 +0100 Subject: [PATCH] fix(credit_billing): teams check --- apps/api/src/services/billing/credit_billing.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/api/src/services/billing/credit_billing.ts b/apps/api/src/services/billing/credit_billing.ts index 47b5eeab..564cbd4b 100644 --- a/apps/api/src/services/billing/credit_billing.ts +++ b/apps/api/src/services/billing/credit_billing.ts @@ -1,13 +1,10 @@ import { NotificationType } from "../../types"; import { withAuth } from "../../lib/withAuth"; import { sendNotification } from "../notification/email_notification"; -import { supabase_service } from "../supabase"; +import { supabase_rr_service, supabase_service } from "../supabase"; import { logger } from "../../lib/logger"; import * as Sentry from "@sentry/node"; import { AuthCreditUsageChunk } from "../../controllers/v1/types"; -import { getACUC, setCachedACUC } from "../../controllers/auth"; -import { issueCredits } from "./issue_credits"; -import { redlock } from "../redlock"; import { autoCharge } from "./auto_charge"; import { getValue, setValue } from "../redis"; import { queueBillingOperation } from "./batch_billing"; @@ -117,7 +114,7 @@ export async function supaCheckTeamCredits( isAutoRechargeEnabled = parsedData.auto_recharge; autoRechargeThreshold = parsedData.auto_recharge_threshold; } else { - const { data, error } = await supabase_service + const { data, error } = await supabase_rr_service .from("teams") .select("auto_recharge, auto_recharge_threshold") .eq("id", team_id)