mirror of
https://github.com/rustfs/console.git
synced 2026-08-28 19:47:21 +08:00
docs: remove code comments about config.json
This commit is contained in:
@@ -221,22 +221,6 @@ describe('config-helpers', () => {
|
||||
json: () => Promise.resolve(null),
|
||||
} as Response)
|
||||
})
|
||||
|
||||
it('应该正确调用 fetch 并设置超时', async () => {
|
||||
vi.mocked(fetch).mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: () => Promise.resolve({}),
|
||||
} as Response)
|
||||
|
||||
expect(fetch).toHaveBeenCalledWith(
|
||||
'https://localhost:3000/config.json',
|
||||
expect.objectContaining({
|
||||
method: 'GET',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
signal: expect.any(AbortSignal),
|
||||
})
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
describe('getConfig', () => {
|
||||
|
||||
@@ -283,11 +283,6 @@ const mergeServerConfig = (baseConfig: SiteConfig, serverConfig: ServerConfigRes
|
||||
/**
|
||||
* Configuration priority strategy: server > localStorage > browser > default
|
||||
*
|
||||
* Attempts to retrieve configuration in the following priority order:
|
||||
* 1. Server configuration (from current host's /config.json)
|
||||
* 2. Configuration saved in localStorage
|
||||
* 3. Current browser host configuration
|
||||
* 4. Default configuration (localhost:9000)
|
||||
*
|
||||
* @returns Promise containing the final configuration retrieval result
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user