feat(config): Use toml instead of env
This commit is contained in:
parent
dd1ce4e324
commit
c6a5790d33
26 changed files with 799 additions and 596 deletions
|
@ -1,4 +1,5 @@
|
|||
import axios from 'axios';
|
||||
import { getSearxngApiEndpoint } from '../config';
|
||||
|
||||
interface SearxngSearchOptions {
|
||||
categories?: string[];
|
||||
|
@ -20,7 +21,9 @@ export const searchSearxng = async (
|
|||
query: string,
|
||||
opts?: SearxngSearchOptions,
|
||||
) => {
|
||||
const url = new URL(`${process.env.SEARXNG_API_URL}/search?format=json`);
|
||||
const searxngURL = getSearxngApiEndpoint();
|
||||
|
||||
const url = new URL(`${searxngURL}/search?format=json`);
|
||||
url.searchParams.append('q', query);
|
||||
|
||||
if (opts) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue