mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-12 12:47:25 +08:00
This commit is contained in:
@@ -221,7 +221,7 @@ class WebRemoteClient implements Api.RemoteClient {
|
|||||||
}
|
}
|
||||||
async generate_config(config: NetworkTypes.NetworkConfig): Promise<Api.GenerateConfigResponse> {
|
async generate_config(config: NetworkTypes.NetworkConfig): Promise<Api.GenerateConfigResponse> {
|
||||||
try {
|
try {
|
||||||
const response = await this.client.post<any, GenerateConfigResponse>('/generate-config', config);
|
const response = await this.client.post<any, GenerateConfigResponse>('/generate-config', { config });
|
||||||
return response;
|
return response;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof AxiosError) {
|
if (error instanceof AxiosError) {
|
||||||
@@ -232,7 +232,7 @@ class WebRemoteClient implements Api.RemoteClient {
|
|||||||
}
|
}
|
||||||
async parse_config(toml_config: string): Promise<Api.ParseConfigResponse> {
|
async parse_config(toml_config: string): Promise<Api.ParseConfigResponse> {
|
||||||
try {
|
try {
|
||||||
const response = await this.client.post<any, ParseConfigResponse>('/parse-config', toml_config);
|
const response = await this.client.post<any, ParseConfigResponse>('/parse-config', { toml_config });
|
||||||
return response;
|
return response;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof AxiosError) {
|
if (error instanceof AxiosError) {
|
||||||
|
|||||||
Reference in New Issue
Block a user