mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-11 14:06:58 +03:00
feat: add base clash api methods
This commit is contained in:
13
fe-app-podkop/src/clash/methods/getConfig.ts
Normal file
13
fe-app-podkop/src/clash/methods/getConfig.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { ClashAPI, IBaseApiResponse } from '../types';
|
||||
import { createBaseApiRequest } from './createBaseApiRequest';
|
||||
|
||||
export async function getClashConfig(): Promise<
|
||||
IBaseApiResponse<ClashAPI.Config>
|
||||
> {
|
||||
return createBaseApiRequest<ClashAPI.Config>(() =>
|
||||
fetch('http://192.168.160.129:9090/configs', {
|
||||
method: 'GET',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
}),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user