Ignore ts for poc

This commit is contained in:
Danny Spina 2023-06-19 14:01:17 +02:00
parent afa1804214
commit a58ec571e2

View File

@ -23,16 +23,23 @@ app.get("/", async (req, res) => {
return
}
const key = process.env.CYCLIC_BRAVE_KEY
if (!key) {
throw new Error("No brave key found");
}
fetch(`${searchEngine}?q=${query}`, {
headers: {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"X-Subscription-Token": process.env.CYCLIC_BRAVE_KEY,
"X-Subscription-Token": key,
},
})
.then((page) => {
page.json().then(response => {
const results = []
const results: any[] = []
// @ts-ignore
response.web.results.forEach(result => {
results.push(`
<div>