Skip to content

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

fix(search): type error cuz of v2 rebase

Gergő Móricz2f3a042856f4
diff --git a/apps/api/src/controllers/v1/search.ts b/apps/api/src/controllers/v1/search.ts
index c17644f86..94a530ab0 100644
--- a/apps/api/src/controllers/v1/search.ts
+++ b/apps/api/src/controllers/v1/search.ts
@@ -325,9 +325,10 @@ export async function searchController(
);
if (matchingDocWithCost) {
+ const { scrapeOptions, internalOptions } = fromV1ScrapeOptions(req.body.scrapeOptions, req.body.timeout, req.auth.team_id);
return await calculateCreditsToBeBilled(
- req.body.scrapeOptions,
- { teamId: req.auth.team_id, bypassBilling: true, zeroDataRetention: false },
+ scrapeOptions,
+ { ...internalOptions, teamId: req.auth.team_id, bypassBilling: true, zeroDataRetention: false },
matchingDocWithCost.document,
matchingDocWithCost.costTracking,
req.acuc?.flags ?? null,