Update index.ts
Some checks failed
STAGING Deploy Images to GHCR / push-app-image (push) Has been cancelled

This commit is contained in:
Nicolas 2024-11-07 14:55:06 -05:00
parent ec0542e942
commit b9e732bdd5

View File

@ -31,16 +31,6 @@ export async function search({
timeout?: number;
}): Promise<SearchResult[]> {
try {
if (process.env.SEARCHAPI_API_KEY) {
return await searchapi_search(query, {
num_results,
tbs,
filter,
lang,
country,
location
});
}
if (process.env.SERPER_API_KEY) {
return await serper_search(query, {
num_results,
@ -51,6 +41,16 @@ export async function search({
location,
});
}
if (process.env.SEARCHAPI_API_KEY) {
return await searchapi_search(query, {
num_results,
tbs,
filter,
lang,
country,
location
});
}
return await googleSearch(
query,
advanced,