fix(settings): update CFDM sync tests and improve error handling
Docker / build (push) Failing after 21s
Docker / build (push) Failing after 21s
Renamed test cases for clarity and added new tests for handling missing CFDM URL and token scenarios. Removed unnecessary checks in the sync request function to streamline the process. Updated integration form to ensure proper boolean handling for settings. Enhanced sync button behavior based on saved credentials.
This commit is contained in:
@@ -14,11 +14,6 @@ export async function requestCfdmFullSync(): Promise<{
|
||||
count?: number
|
||||
error?: string
|
||||
}> {
|
||||
const row = settingsRepository.getBySpace()
|
||||
if (!row?.integrationEnabled) {
|
||||
return { ok: false, error: 'Включите приём синхронизации' }
|
||||
}
|
||||
|
||||
const token = settingsRepository.getIntegrationToken()
|
||||
const baseUrl = resolveCfdmApiBase()
|
||||
if (!baseUrl) return { ok: false, error: 'Укажите URL API CFDM' }
|
||||
|
||||
Reference in New Issue
Block a user