Sha256: 2da98149f151dd2536d747f9d166db012319a39ec761a1de4a118cbe5aff8735

Contents?: true

Size: 804 Bytes

Versions: 15

Compression:

Stored size: 804 Bytes

Contents

import api, { orgId } from '../../../services/api';
import {
  ANSIBLE_COLLECTION_DETAILS_ERROR,
  ANSIBLE_COLLECTION_DETAILS_REQUEST,
  ANSIBLE_COLLECTION_DETAILS_SUCCESS,
} from './AnsibleCollectionDetailsConstants';
import { apiError } from '../../../move_to_foreman/common/helpers';

export const getAnsibleCollectionDetails = ansibleCollectionId => async (dispatch) => {
  dispatch({ type: ANSIBLE_COLLECTION_DETAILS_REQUEST });

  try {
    const { data } = await api.get(`/ansible_collections/${ansibleCollectionId}`, {}, { organization_id: orgId() });
    return dispatch({
      type: ANSIBLE_COLLECTION_DETAILS_SUCCESS,
      response: data,
    });
  } catch (error) {
    return dispatch(apiError(ANSIBLE_COLLECTION_DETAILS_ERROR, error));
  }
};

export default getAnsibleCollectionDetails;

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
katello-3.16.2 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.1.2 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.1.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.0 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.0.rc5.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.0.rc5 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.0.rc4.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.0.rc4 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.0.rc3.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.0.rc3 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.0.rc2.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.0.rc2 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.0.rc1.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.16.0.rc1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js