fix(api): harden response contracts
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user