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