Sha256: 324767c478a64b81fcd72b64960275cb45fffd8ea07d694b86b177b384e91a94
Contents?: true
Size: 572 Bytes
Versions: 19
Compression:
Stored size: 572 Bytes
Contents
import API from 'foremanReact/API'; import { addToast } from 'foremanReact/redux/actions/toasts'; import { insightsCloudUrl } from './InsightsCloudSyncHelpers'; import { INSIGHTS_CLOUD_SYNC_SUCCESS } from './InsightsCloudSyncConstants'; export const syncInsights = () => async dispatch => { try { await API.post(insightsCloudUrl('tasks')); dispatch({ type: INSIGHTS_CLOUD_SYNC_SUCCESS, payload: {}, }); } catch ({ message }) { dispatch( addToast({ sticky: true, type: 'error', message, }) ); } };
Version data entries
19 entries across 19 versions & 1 rubygems