webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js in katello-3.16.0.rc3.1 vs webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js in katello-3.16.0.rc4

- old
+ new

@@ -8,10 +8,24 @@ UPSTREAM_SUBSCRIPTIONS_SUCCESS, UPSTREAM_SUBSCRIPTIONS_FAILURE, SAVE_UPSTREAM_SUBSCRIPTIONS_REQUEST, SAVE_UPSTREAM_SUBSCRIPTIONS_SUCCESS, SAVE_UPSTREAM_SUBSCRIPTIONS_FAILURE, -} from './UpstreamSubscriptionsContstants'; + PING_UPSTREAM_SUBSCRIPTIONS_SUCCESS, + PING_UPSTREAM_SUBSCRIPTIONS_FAILURE, +} from './UpstreamSubscriptionsConstants'; + +export const pingUpstreamSubscriptions = () => async (dispatch) => { + try { + const { data } = await api.get(`/organizations/${orgId()}/upstream_subscriptions/ping`); + return dispatch({ + type: PING_UPSTREAM_SUBSCRIPTIONS_SUCCESS, + payload: data, + }); + } catch (error) { + return dispatch(apiError(PING_UPSTREAM_SUBSCRIPTIONS_FAILURE, error)); + } +}; export const loadUpstreamSubscriptions = (extendedParams = {}) => async (dispatch) => { dispatch({ type: UPSTREAM_SUBSCRIPTIONS_REQUEST }); const params = {