Skip to content

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

Update map.ts

Nicolas304b3e752e29
diff --git a/apps/api/src/controllers/v1/map.ts b/apps/api/src/controllers/v1/map.ts
index 7231ac02d..90e541d82 100644
--- a/apps/api/src/controllers/v1/map.ts
+++ b/apps/api/src/controllers/v1/map.ts
@@ -30,7 +30,8 @@ export async function mapController(
req.body = mapRequestSchema.parse(req.body);
- const limit = req.body.limit;
+ const limit = req.body.limit ?? 5000;
+
const id = uuidv4();
let links: string[] = [req.body.url];
@@ -110,7 +111,7 @@ export async function mapController(
job_id: id,
success: links.length > 0,
message: "Map completed",
- num_docs: links.length,
+ num_docs: linksToReturn.length,
docs: linksToReturn,
time_taken: timeTakenInSeconds,
team_id: req.auth.team_id,