From e5a6393fa8cdf4c92b2e68b5d2f4c7633ca5d690 Mon Sep 17 00:00:00 2001 From: yaling888 <73897884+yaling888@users.noreply.github.com> Date: Sat, 7 May 2022 02:43:42 +0800 Subject: feat: add tun stack config to config page --- src/api/configs.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/api') diff --git a/src/api/configs.ts b/src/api/configs.ts index e084261..ed2b1e9 100644 --- a/src/api/configs.ts +++ b/src/api/configs.ts @@ -1,5 +1,5 @@ import { getURLAndInit } from 'src/misc/request-helper'; -import { ClashGeneralConfig } from 'src/store/types'; +import { ClashGeneralConfig, TunPartial } from 'src/store/types'; import { ClashAPIConfig } from 'src/types'; const endpoint = '/configs'; @@ -14,7 +14,7 @@ export async function fetchConfigs(apiConfig: ClashAPIConfig) { // req body // { Path: string } -type ClashConfigPartial = Partial; +type ClashConfigPartial = TunPartial; function configsPatchWorkaround(o: ClashConfigPartial) { // backward compatibility for older clash using `socket-port` if ('socks-port' in o) { @@ -32,7 +32,7 @@ export async function updateConfigs( return await fetch(url + endpoint, { ...init, body, method: 'PATCH' }); } -export async function reloadConfigs( +export async function reloadConfigFile( apiConfig: ClashAPIConfig ) { const { url, init } = getURLAndInit(apiConfig); -- cgit v1.3.1