Sha256: dd416e3ff99004cd0ed8568aa481cd9b71025dff5afa4a9a962fc176ec9ebcec

Contents?: true

Size: 609 Bytes

Versions: 34

Compression:

Stored size: 609 Bytes

Contents

import api, { orgId } from '../../services/api';

import {
  PRODUCTS_REQUEST,
  PRODUCTS_SUCCESS,
  PRODUCTS_FAILURE,
} from './ProductConstants';
import { apiError } from '../../move_to_foreman/common/helpers.js';

export const loadProducts = (params = {}) => (dispatch) => {
  dispatch({ type: PRODUCTS_REQUEST });

  return api
    .get(`/organizations/${orgId()}/products/`, {}, params)
    .then(({ data }) => {
      dispatch({
        type: PRODUCTS_SUCCESS,
        response: data,
      });
    })
    .catch(result => dispatch(apiError(PRODUCTS_FAILURE, result)));
};

export default loadProducts;

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
katello-3.13.4 webpack/scenes/Products/ProductActions.js
katello-3.13.3 webpack/scenes/Products/ProductActions.js
katello-3.13.2 webpack/scenes/Products/ProductActions.js
katello-3.13.1 webpack/scenes/Products/ProductActions.js
katello-3.13.0 webpack/scenes/Products/ProductActions.js
katello-3.13.0.rc2.1 webpack/scenes/Products/ProductActions.js
katello-3.13.0.rc2 webpack/scenes/Products/ProductActions.js
katello-3.12.3 webpack/scenes/Products/ProductActions.js
katello-3.12.2 webpack/scenes/Products/ProductActions.js
katello-3.13.0.rc1 webpack/scenes/Products/ProductActions.js
katello-3.12.1 webpack/scenes/Products/ProductActions.js
katello-3.11.2 webpack/scenes/Products/ProductActions.js
katello-3.10.2 webpack/scenes/Products/ProductActions.js
katello-3.12.0 webpack/scenes/Products/ProductActions.js
katello-3.12.0.rc2 webpack/scenes/Products/ProductActions.js
katello-3.10.1.1 webpack/scenes/Products/ProductActions.js
katello-3.12.0.rc1 webpack/scenes/Products/ProductActions.js
katello-3.10.1 webpack/scenes/Products/ProductActions.js
katello-3.11.1 webpack/scenes/Products/ProductActions.js
katello-3.11.0 webpack/scenes/Products/ProductActions.js