Sha256: 1a2d85db1f352de3439f6ee87e088a151957033933430fa56083e9e0e0fcbe14

Contents?: true

Size: 549 Bytes

Versions: 15

Compression:

Stored size: 549 Bytes

Contents

import API from 'foremanReact/API';
import { insightsCloudUrl } from './InsightsCloudSyncHelpers';
import {
  INSIGHTS_CLOUD_SYNC_SUCCESS,
  INSIGHTS_CLOUD_SYNC_FAILURE,
} from './InsightsCloudSyncConstants';

export const syncInsights = () => async dispatch => {
  try {
    await API.post(insightsCloudUrl('tasks'));
    dispatch({
      type: INSIGHTS_CLOUD_SYNC_SUCCESS,
      payload: {},
    });
  } catch (error) {
    dispatch({
      type: INSIGHTS_CLOUD_SYNC_FAILURE,
      payload: {
        error: error.message,
      },
    });
  }
};

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
foreman_rh_cloud-0.9.12 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-1.0.12 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-2.0.12 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-0.9.11 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-1.0.11 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-2.0.11 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-0.9.10 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-1.0.10 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-2.0.10 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-2.0.9 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-1.0.9 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-0.9.9 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-0.9.8 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-1.0.8 webpack/InsightsCloudSync/InsightsCloudSyncActions.js
foreman_rh_cloud-2.0.8 webpack/InsightsCloudSync/InsightsCloudSyncActions.js