Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

temp: move more to main instance

Gergő Móriczb9dde3fc3db7
diff --git a/apps/api/src/controllers/auth.ts b/apps/api/src/controllers/auth.ts
index ae9abcff5..6f3f0580e 100644
--- a/apps/api/src/controllers/auth.ts
+++ b/apps/api/src/controllers/auth.ts
@@ -97,8 +97,7 @@ export async function getACUC(
mode === RateLimiterMode.Extract ||
mode === RateLimiterMode.ExtractStatus;
while (retries < maxRetries) {
- const client =
- Math.random() > (2/3) ? supabase_rr_service : supabase_service;
+ const client = supabase_service;
({ data, error } = await client.rpc(
"auth_credit_usage_chunk_26_tally",
{ input_key: api_key, i_is_extract: isExtract, tally_untallied_credits: true },
diff --git a/apps/api/src/controllers/v1/crawl-status.ts b/apps/api/src/controllers/v1/crawl-status.ts
index 96aa578e6..7e847ad53 100644
--- a/apps/api/src/controllers/v1/crawl-status.ts
+++ b/apps/api/src/controllers/v1/crawl-status.ts
@@ -246,7 +246,7 @@ export async function crawlStatusController(
let totalCount = jobIDs.length;
if (totalCount === 0 && process.env.USE_DB_AUTHENTICATION === "true") {
- const x = await supabase_rr_service
+ const x = await supabase_service
.from('firecrawl_jobs')
.select('*', { count: 'exact', head: true })
.eq("crawl_id", req.params.jobId)
diff --git a/apps/api/src/services/billing/auto_charge.ts b/apps/api/src/services/billing/auto_charge.ts
index b30be201d..8540b1eaa 100644
--- a/apps/api/src/services/billing/auto_charge.ts
+++ b/apps/api/src/services/billing/auto_charge.ts
@@ -124,7 +124,7 @@ export async function autoCharge(
if (chunk.sub_user_id) {
// Fetch the customer's Stripe information
const { data: customer, error: customersError } =
- await supabase_rr_service
+ await supabase_service
.from("customers")
.select("id, stripe_customer_id")
.eq("id", chunk.sub_user_id)
diff --git a/apps/api/src/services/idempotency/validate.ts b/apps/api/src/services/idempotency/validate.ts
index 54ec7bd04..4a5fbe653 100644
--- a/apps/api/src/services/idempotency/validate.ts
+++ b/apps/api/src/services/idempotency/validate.ts
@@ -18,7 +18,7 @@ export async function validateIdempotencyKey(req: Request): Promise<boolean> {
return false;
}
- const { data, error } = await supabase_rr_service
+ const { data, error } = await supabase_service
.from("idempotency_keys")
.select("key")
.eq("key", idempotencyKey);