11 lines
523 B
TypeScript
11 lines
523 B
TypeScript
import api from './client';
|
|
import type { ProxyConfig, ProxyTestResult, PlatformInfo } from './types';
|
|
|
|
export const proxyApi = {
|
|
get: () => api.get<ProxyConfig, ProxyConfig>('/proxy'),
|
|
update: (data: ProxyConfig) => api.put<ProxyConfig, ProxyConfig>('/proxy', data),
|
|
test: () => api.post<ProxyTestResult, ProxyTestResult>('/proxy/test'),
|
|
testWhitelist: () => api.post<ProxyTestResult, ProxyTestResult>('/proxy/whitelist/test'),
|
|
getPlatforms: () => api.get<PlatformInfo[], PlatformInfo[]>('/proxy/platforms'),
|
|
};
|