Sha256: fa2f825640a5f6fd4191da77ff008c15c5b4180979dba3bb0b44fffa1ca8ccd2

Contents?: true

Size: 759 Bytes

Versions: 16

Compression:

Stored size: 759 Bytes

Contents

import api 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}`);
    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

16 entries across 16 versions & 1 rubygems

Version Path
katello-3.15.3.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.15.3 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.15.2 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.15.1.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.15.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.15.0.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.15.0 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.15.0.rc2 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.15.0.rc1.3 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.15.0.rc1.2 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.15.0.rc1.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.15.0.rc1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.14.1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.14.0 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.14.0.rc2 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js
katello-3.14.0.rc1 webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js