Sha256: 8ffb673e80b68375e8cb72449bb9dfa6a05a7aeb29948bc2d55609d18ad789bf
Contents?: true
Size: 812 Bytes
Versions: 31
Compression:
Stored size: 812 Bytes
Contents
import { propsToSnakeCase } from 'foremanReact/common/helpers'; import api, { orgId } from '../../services/api'; import { MODULE_STREAMS_REQUEST, MODULE_STREAMS_SUCCESS, MODULE_STREAMS_FAILURE, } from './ModuleStreamsConstants'; import { apiError } from '../../move_to_foreman/common/helpers.js'; export const getModuleStreams = (extendedParams = {}) => async (dispatch) => { dispatch({ type: MODULE_STREAMS_REQUEST }); const params = { organization_id: orgId(), ...propsToSnakeCase(extendedParams), }; try { const { data } = await api.get('/module_streams', {}, params); return dispatch({ type: MODULE_STREAMS_SUCCESS, response: data, }); } catch (error) { return dispatch(apiError(MODULE_STREAMS_FAILURE, error)); } }; export default getModuleStreams;
Version data entries
31 entries across 31 versions & 1 rubygems