Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix(api): cached acuc didn't have the is_extract flag set (#1712)
Gergő Móricz3d04c2087e80
diff --git a/apps/api/src/controllers/auth.ts b/apps/api/src/controllers/auth.tsindex 60d5d73b6..0cc24d6f4 100644--- a/apps/api/src/controllers/auth.ts+++ b/apps/api/src/controllers/auth.ts@@ -210,13 +210,17 @@ export async function getACUC(const chunk: AuthCreditUsageChunk | null =data.length === 0 ? null : data[0].team_id === null ? null : data[0];++ if (chunk) {+ chunk.is_extract = isExtract;+ }// NOTE: Should we cache null chunks? - mogeryif (chunk !== null && useCache) {setCachedACUC(api_key, isExtract, chunk);}- return chunk ? { ...chunk, is_extract: isExtract } : null;+ return chunk;} else {return null;}