Merge pull request #767 from mendableai/nsc/fixes-credit-usage

[RPC] Improvements to credit_usage rpc
This commit is contained in:
Nicolas 2024-10-11 15:29:39 -03:00 committed by GitHub
commit 5e5e11f34b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -77,7 +77,7 @@ export async function getACUC(api_key: string, cacheOnly = false): Promise<AuthC
return JSON.parse(cachedACUC); return JSON.parse(cachedACUC);
} else if (!cacheOnly) { } else if (!cacheOnly) {
const { data, error } = const { data, error } =
await supabase_service.rpc("auth_credit_usage_chunk", { input_key: api_key }); await supabase_service.rpc("auth_credit_usage_chunk_test_3", { input_key: api_key });
if (error) { if (error) {
throw new Error("Failed to retrieve authentication and credit usage data: " + JSON.stringify(error)); throw new Error("Failed to retrieve authentication and credit usage data: " + JSON.stringify(error));