mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-10-21 14:58:15 +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 suggestions: string[] = res.data.suggestions;
|
||||
const results: SearxngSearchResult[] = data.results;
|
||||
const suggestions: string[] = data.suggestions;
|
||||
|
||||
return { results, suggestions };
|
||||
};
|
||||
|
Reference in New Issue
Block a user