Skip to content

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

Update fireEngine.ts

Nicolas5bbbb52a30da
diff --git a/apps/api/src/search/fireEngine.ts b/apps/api/src/search/fireEngine.ts
index 2b5ffd2e2..09a58e4e1 100644
--- a/apps/api/src/search/fireEngine.ts
+++ b/apps/api/src/search/fireEngine.ts
@@ -1,4 +1,3 @@
-import axios from "axios";
import dotenv from "dotenv";
import { SearchResult } from "../../src/lib/entities";
import * as Sentry from "@sentry/node";
@@ -40,19 +39,19 @@ export async function fireEngineMap(
}
console.log("process.env.FIRE_ENGINE_BETA_URL", process.env.FIRE_ENGINE_BETA_URL);
- let config = {
+ const response = await fetch(`${process.env.FIRE_ENGINE_BETA_URL}/search`, {
method: "POST",
- url: `${process.env.FIRE_ENGINE_BETA_URL}/search`,
headers: {
"Content-Type": "application/json",
"X-Disable-Cache": "true"
},
- data: data,
- };
- const response = await axios(config);
- if (response && response.data) {
- console.log("response", response.data);
- return response.data;
+ body: data
+ });
+
+ if (response.ok) {
+ const responseData = await response.json();
+ console.log("response", responseData);
+ return responseData;
} else {
return [];
}