mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 15:49:02 +08:00
Update map.ts
This commit is contained in:
parent
fb553a020d
commit
463d38f77e
@ -95,12 +95,14 @@ export async function mapController(
|
|||||||
const endTime = new Date().getTime();
|
const endTime = new Date().getTime();
|
||||||
const timeTakenInSeconds = (endTime - startTime) / 1000;
|
const timeTakenInSeconds = (endTime - startTime) / 1000;
|
||||||
|
|
||||||
|
const linksToReturn = links.slice(0, limit);
|
||||||
|
|
||||||
logJob({
|
logJob({
|
||||||
job_id: id,
|
job_id: id,
|
||||||
success: links.length > 0,
|
success: links.length > 0,
|
||||||
message: "Map completed",
|
message: "Map completed",
|
||||||
num_docs: 1,
|
num_docs: links.length,
|
||||||
docs: links,
|
docs: linksToReturn,
|
||||||
time_taken: timeTakenInSeconds,
|
time_taken: timeTakenInSeconds,
|
||||||
team_id: req.auth.team_id,
|
team_id: req.auth.team_id,
|
||||||
mode: "map",
|
mode: "map",
|
||||||
@ -114,6 +116,6 @@ export async function mapController(
|
|||||||
|
|
||||||
return res.status(200).json({
|
return res.status(200).json({
|
||||||
success: true,
|
success: true,
|
||||||
links: links.slice(0, limit),
|
links: linksToReturn,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user