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