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

Version Path
katello-3.16.2 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.1.2 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.1.1 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.1 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.0 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.0.rc5.1 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.0.rc5 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.0.rc4.1 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.15.3.1 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.15.3 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.0.rc4 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.0.rc3.1 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.15.2 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.0.rc3 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.0.rc2.1 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.0.rc2 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.15.1.1 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.0.rc1.1 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.15.1 webpack/scenes/ModuleStreams/ModuleStreamsActions.js
katello-3.16.0.rc1 webpack/scenes/ModuleStreams/ModuleStreamsActions.js