Sha256: ee42ac83d2cc36aee6817eed75e2c077eedb5ea2c1ea1841dcf252224a7a604e
Contents?: true
Size: 736 Bytes
Versions: 31
Compression:
Stored size: 736 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 => async (dispatch) => { dispatch({ type: SUBSCRIPTION_DETAILS_REQUEST }); try { const { data } = await api.get(`/organizations/${orgId()}/subscriptions/${subscriptionId}`); return dispatch({ type: SUBSCRIPTION_DETAILS_SUCCESS, response: data, }); } catch (error) { return dispatch(apiError(SUBSCRIPTION_DETAILS_FAILURE, error)); } }; export default loadSubscriptionDetails;
Version data entries
31 entries across 31 versions & 1 rubygems