feat(config): add searxngURL

This commit is contained in:
ItzCrazyKns
2025-10-15 13:02:08 +05:30
parent 626cb646e2
commit b67ca79e2a
3 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
import axios from 'axios';
import { getSearxngApiEndpoint } from './config';
import { getSearxngURL } from './config/serverRegistry';
interface SearxngSearchOptions {
categories?: string[];
@@ -23,7 +23,7 @@ export const searchSearxng = async (
query: string,
opts?: SearxngSearchOptions,
) => {
const searxngURL = getSearxngApiEndpoint();
const searxngURL = getSearxngURL();
const url = new URL(`${searxngURL}/search?format=json`);
url.searchParams.append('q', query);