mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-06-16 21:03:58 +08:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user