mirror of
https://github.com/itdoginfo/podkop.git
synced 2026-05-25 21:51:45 +03:00
15 lines
443 B
TypeScript
15 lines
443 B
TypeScript
import { ClashAPI, IBaseApiResponse } from '../types';
|
|
import { createBaseApiRequest } from './createBaseApiRequest';
|
|
import { getClashApiUrl } from '../../helpers';
|
|
|
|
export async function getClashConfig(): Promise<
|
|
IBaseApiResponse<ClashAPI.Config>
|
|
> {
|
|
return createBaseApiRequest<ClashAPI.Config>(() =>
|
|
fetch(`${getClashApiUrl()}/configs`, {
|
|
method: 'GET',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
}),
|
|
);
|
|
}
|