refactor(api-call): drop dead statusCode/headers field aliases

The backend api-call response schema (api_tools.go:54-56) fixes the
field names to status_code / header / body. camelCase statusCode and
plural headers are never emitted.
This commit is contained in:
LTbinglingfeng
2026-05-28 00:38:47 +08:00
Unverified
parent 21e9e983e6
commit fadf2a67b8
+2 -2
View File
@@ -83,8 +83,8 @@ export const apiCallApi = {
config?: AxiosRequestConfig
): Promise<ApiCallResult> => {
const response = await apiClient.post<Record<string, unknown>>('/api-call', payload, config);
const statusCode = Number(response?.status_code ?? response?.statusCode ?? 0);
const header = (response?.header ?? response?.headers ?? {}) as Record<string, string[]>;
const statusCode = Number(response?.status_code ?? 0);
const header = (response?.header ?? {}) as Record<string, string[]>;
const { bodyText, body } = normalizeBody(response?.body);
return {