fix(api): harden response contracts

This commit is contained in:
2026-07-21 16:44:16 +08:00
parent fe0c4e312e
commit bc1cd19c51
11 changed files with 191 additions and 26 deletions

View File

@@ -6,6 +6,7 @@ import {
IconLaunch,
IconLoading,
} from '@arco-design/web-react/icon'
import { normalizeBaseUrl } from '../api/client'
const { Title, Text } = Typography
@@ -114,8 +115,3 @@ async function checkServerStatus(
setStatus('offline')
}
}
function normalizeBaseUrl(value: string) {
const trimmed = value.trim()
return trimmed.endsWith('/') ? trimmed.slice(0, -1) : trimmed
}