diff --git a/easytier-web/frontend/src/modules/api.ts b/easytier-web/frontend/src/modules/api.ts index 2f997b06..2b8de6aa 100644 --- a/easytier-web/frontend/src/modules/api.ts +++ b/easytier-web/frontend/src/modules/api.ts @@ -221,7 +221,7 @@ class WebRemoteClient implements Api.RemoteClient { } async generate_config(config: NetworkTypes.NetworkConfig): Promise { try { - const response = await this.client.post('/generate-config', config); + const response = await this.client.post('/generate-config', { config }); return response; } catch (error) { if (error instanceof AxiosError) { @@ -232,7 +232,7 @@ class WebRemoteClient implements Api.RemoteClient { } async parse_config(toml_config: string): Promise { try { - const response = await this.client.post('/parse-config', toml_config); + const response = await this.client.post('/parse-config', { toml_config }); return response; } catch (error) { if (error instanceof AxiosError) {