fix(locale): send canonical admin locale

This commit is contained in:
2026-09-07 21:32:38 +08:00
parent 2bc5c5df50
commit d39a88c445
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ describe('api client', () => {
const [url, init] = fetchMock.mock.calls[0]
expect(String(url)).toContain('/api/admin/v1/x')
expect(init.headers.Authorization).toBe('Bearer token-1')
expect(init.headers['X-Language-Locale']).toBe('zh-CN')
expect(init.headers['X-Language-Locale']).toBe('zh-Hans')
})
it('sends FormData untouched so the browser can set the multipart boundary', async () => {
+1 -1
View File
@@ -93,7 +93,7 @@ async function rawRequest(path: string, options: RequestOptions, retried = false
const { accessToken } = useAuthStore.getState()
const headers: Record<string, string> = {
Accept: 'application/json',
'X-Language-Locale': 'zh-CN',
'X-Language-Locale': 'zh-Hans',
}
// A FormData body must be passed through untouched: the browser sets
// `multipart/form-data` *with the boundary parameter*, which we cannot