Sha256: f06f3731d1bf6ac359f6d4866ccaec86313a3cc3a0da278cf4d1c37cb91ee6c9
Contents?: true
Size: 740 Bytes
Versions: 6
Compression:
Stored size: 740 Bytes
Contents
import api, { orgId } from '../../../services/api'; import { SUBSCRIPTION_DETAILS_REQUEST, SUBSCRIPTION_DETAILS_SUCCESS, SUBSCRIPTION_DETAILS_FAILURE, } from './SubscriptionDetailConstants'; import { apiError } from '../../../move_to_foreman/common/helpers.js'; export const loadSubscriptionDetails = subscriptionId => (dispatch, getState) => { dispatch({ type: SUBSCRIPTION_DETAILS_REQUEST }); return api .get(`/organizations/${orgId()}/subscriptions/${subscriptionId}`) .then(({ data }) => { dispatch({ type: SUBSCRIPTION_DETAILS_SUCCESS, response: data, }); }) .catch(result => dispatch(apiError(SUBSCRIPTION_DETAILS_FAILURE, result))); }; export default loadSubscriptionDetails;
Version data entries
6 entries across 6 versions & 1 rubygems