diff options
Diffstat (limited to 'webapp/utils')
-rw-r--r-- | webapp/utils/async_client.jsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx index 04e101aa9..e55742140 100644 --- a/webapp/utils/async_client.jsx +++ b/webapp/utils/async_client.jsx @@ -405,7 +405,7 @@ export function getComplianceReports() { ); } -export function getConfig() { +export function getConfig(success, error) { if (isCallInProgress('getConfig')) { return; } @@ -419,10 +419,17 @@ export function getConfig() { type: ActionTypes.RECEIVED_CONFIG, config: data }); + + if (success) { + success(data); + } }, (err) => { callTracker.getConfig = 0; - dispatchError(err, 'getConfig'); + + if (!error) { + dispatchError(err, 'getConfig'); + } } ); } |