Sha256: 3453f2f82561b6ad37c8027d62c8c080b94649e17208b3cae88602daf411dc47

Contents?: true

Size: 937 Bytes

Versions: 77

Compression:

Stored size: 937 Bytes

Contents

import { API_OPERATIONS, get } from 'foremanReact/redux/API';
import api from '../../services/api';
import { CONTENT_KEY, CONTENT_TYPES_KEY, CONTENT_ID_KEY, REPOSITORY_CONTENT_ID_KEY } from './ContentConstants';

export const getContent = (contentType, params) => get({
  type: API_OPERATIONS.GET,
  key: CONTENT_KEY,
  params,
  url: api.getApiUrl(`/${contentType}`),
});

export const getContentTypes = () => get({
  type: API_OPERATIONS.GET,
  key: CONTENT_TYPES_KEY,
  url: api.getApiUrl('/repositories/content_types'),
});

export const getContentDetails = (contentType, id) => get({
  type: API_OPERATIONS.GET,
  key: CONTENT_ID_KEY,
  url: api.getApiUrl(`/${contentType}/${id}`),
});

export const getRepositoryContentDetails = (contentType, id, params) => get({
  type: API_OPERATIONS.GET,
  key: REPOSITORY_CONTENT_ID_KEY,
  params,
  url: api.getApiUrl(`/repositories?${contentType}_id=${id}`),
});

export default getContent;

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
katello-4.16.0 webpack/scenes/Content/ContentActions.js
katello-4.15.1 webpack/scenes/Content/ContentActions.js
katello-4.16.0.rc2 webpack/scenes/Content/ContentActions.js
katello-4.16.0.rc1 webpack/scenes/Content/ContentActions.js
katello-4.14.3 webpack/scenes/Content/ContentActions.js
katello-4.14.2 webpack/scenes/Content/ContentActions.js
katello-4.15.0 webpack/scenes/Content/ContentActions.js
katello-4.15.0.rc2 webpack/scenes/Content/ContentActions.js
katello-4.15.0.rc1 webpack/scenes/Content/ContentActions.js
katello-4.14.1 webpack/scenes/Content/ContentActions.js
katello-4.14.0 webpack/scenes/Content/ContentActions.js
katello-4.14.0.rc3 webpack/scenes/Content/ContentActions.js
katello-4.14.0.rc2 webpack/scenes/Content/ContentActions.js
katello-4.14.0.rc1.1 webpack/scenes/Content/ContentActions.js
katello-4.14.0.rc1 webpack/scenes/Content/ContentActions.js
katello-4.13.1 webpack/scenes/Content/ContentActions.js
katello-4.13.0 webpack/scenes/Content/ContentActions.js
katello-4.12.1 webpack/scenes/Content/ContentActions.js
katello-4.13.0.rc1 webpack/scenes/Content/ContentActions.js
katello-4.12.0 webpack/scenes/Content/ContentActions.js