mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-10-22 07:18:16 +00:00
feat(searxng): use fetch instead of axios
This commit is contained in:
@@ -39,10 +39,11 @@ export const searchSearxng = async (
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await axios.get(url.toString());
|
const res = await fetch(url);
|
||||||
|
const data = await res.json();
|
||||||
|
|
||||||
const results: SearxngSearchResult[] = res.data.results;
|
const results: SearxngSearchResult[] = data.results;
|
||||||
const suggestions: string[] = res.data.suggestions;
|
const suggestions: string[] = data.suggestions;
|
||||||
|
|
||||||
return { results, suggestions };
|
return { results, suggestions };
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user