From 0bed648b0d711e0e5b7b1ea1a253f2b91c3b0013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Fri, 11 Apr 2025 07:13:25 +0200 Subject: [PATCH] Revert "Revert "Revert "temp: get acuc from main db""" This reverts commit d3b821e8279414b2b998705aa93b644621a0d4cc. --- apps/api/src/controllers/auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/controllers/auth.ts b/apps/api/src/controllers/auth.ts index 98192bc8..395331af 100644 --- a/apps/api/src/controllers/auth.ts +++ b/apps/api/src/controllers/auth.ts @@ -136,7 +136,7 @@ export async function getACUC( const maxRetries = 5; while (retries < maxRetries) { const client = - /* Math.random() > (2/3) ? supabase_rr_service : */ supabase_service; + Math.random() > (2/3) ? supabase_rr_service : supabase_service; ({ data, error } = await client.rpc( "auth_credit_usage_chunk_28", { input_key: api_key, i_is_extract: isExtract, tally_untallied_credits: true }, @@ -247,7 +247,7 @@ export async function getACUCTeam( while (retries < maxRetries) { const client = - /* Math.random() > (2/3) ? supabase_rr_service : */ supabase_service; + Math.random() > (2/3) ? supabase_rr_service : supabase_service; ({ data, error } = await client.rpc( "auth_credit_usage_chunk_28_from_team", { input_team: team_id, i_is_extract: isExtract, tally_untallied_credits: true },