fix(locale): send canonical admin locale
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user