From 53134b7c85f88eed686ae657e7ff3ee35dbdf0f7 Mon Sep 17 00:00:00 2001 From: rafaelmmiller <150964962+rafaelsideguide@users.noreply.github.com> Date: Tue, 19 Nov 2024 09:34:52 -0300 Subject: [PATCH] Rafa: removed throw error and added map to requests --- apps/api/requests.http | 14 +++++++++++++- apps/api/src/controllers/v1/map.ts | 4 ---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/apps/api/requests.http b/apps/api/requests.http index 4ce40b2c..9fe36aa7 100644 --- a/apps/api/requests.http +++ b/apps/api/requests.http @@ -46,4 +46,16 @@ content-type: application/json @batchScrapeId = {{batchScrape.response.body.$.id}} # @name batchScrapeStatus GET {{baseUrl}}/v1/crawl/{{batchScrapeId}} HTTP/1.1 -Authorization: Bearer {{$dotenv TEST_API_KEY}} \ No newline at end of file +Authorization: Bearer {{$dotenv TEST_API_KEY}} + + +### Map Website +# @name map +POST {{baseUrl}}/v1/map HTTP/1.1 +Authorization: Bearer {{$dotenv TEST_API_KEY}} +content-type: application/json + +{ + "url": "firecrawl.dev", + "sitemapOnly": true +} \ No newline at end of file diff --git a/apps/api/src/controllers/v1/map.ts b/apps/api/src/controllers/v1/map.ts index 8ab5c135..c8c07b6b 100644 --- a/apps/api/src/controllers/v1/map.ts +++ b/apps/api/src/controllers/v1/map.ts @@ -80,10 +80,6 @@ export async function getMapResults({ // If sitemapOnly is true, only get links from sitemap if (crawlerOptions.sitemapOnly) { - if (includeMetadata) { - throw new Error("includeMetadata is not supported with sitemapOnly"); - } - const sitemap = await crawler.tryGetSitemap(true, true); if (sitemap !== null) { sitemap.forEach((x) => {