From fadf2a67b857070600fc062450804286b78d48bd Mon Sep 17 00:00:00 2001 From: LTbinglingfeng Date: Thu, 28 May 2026 00:38:47 +0800 Subject: [PATCH] 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. --- src/services/api/apiCall.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/api/apiCall.ts b/src/services/api/apiCall.ts index 043ae7c..c88e63a 100644 --- a/src/services/api/apiCall.ts +++ b/src/services/api/apiCall.ts @@ -83,8 +83,8 @@ export const apiCallApi = { config?: AxiosRequestConfig ): Promise => { const response = await apiClient.post>('/api-call', payload, config); - const statusCode = Number(response?.status_code ?? response?.statusCode ?? 0); - const header = (response?.header ?? response?.headers ?? {}) as Record; + const statusCode = Number(response?.status_code ?? 0); + const header = (response?.header ?? {}) as Record; const { bodyText, body } = normalizeBody(response?.body); return {