Sha256: 1c7f9d1fd1929e6fd2b729f870c32ae213c64048016b435ccda857d83028f09e

Contents?: true

Size: 754 Bytes

Versions: 72

Compression:

Stored size: 754 Bytes

Contents

import { API_OPERATIONS, get, post } from 'foremanReact/redux/API';
import { translate as __ } from 'foremanReact/common/I18n';
import { getBookmarkErrorMsgs } from '../../utils/helpers';
import { bookmarkKey, CREATE_BOOKMARK } from './BookmarkConstants';


export const getBookmarks = key =>
  get({
    type: API_OPERATIONS.GET,
    key: bookmarkKey(key),
    url: '/api/v2/bookmarks',
    params: { search: `controller=${key}` },
  });

export const createBookmark = (params, handleSuccess) =>
  post({
    type: API_OPERATIONS.POST,
    key: CREATE_BOOKMARK,
    url: '/api/v2/bookmarks',
    params,
    handleSuccess,
    errorToast: error =>
      __(`Something went wrong while adding a bookmark: ${getBookmarkErrorMsgs(error.response)}`),
  });

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
katello-4.14.2 webpack/components/Bookmark/BookmarkActions.js
katello-4.15.0 webpack/components/Bookmark/BookmarkActions.js
katello-4.15.0.rc2 webpack/components/Bookmark/BookmarkActions.js
katello-4.15.0.rc1 webpack/components/Bookmark/BookmarkActions.js
katello-4.14.1 webpack/components/Bookmark/BookmarkActions.js
katello-4.14.0 webpack/components/Bookmark/BookmarkActions.js
katello-4.14.0.rc3 webpack/components/Bookmark/BookmarkActions.js
katello-4.14.0.rc2 webpack/components/Bookmark/BookmarkActions.js
katello-4.14.0.rc1.1 webpack/components/Bookmark/BookmarkActions.js
katello-4.14.0.rc1 webpack/components/Bookmark/BookmarkActions.js
katello-4.13.1 webpack/components/Bookmark/BookmarkActions.js
katello-4.13.0 webpack/components/Bookmark/BookmarkActions.js
katello-4.12.1 webpack/components/Bookmark/BookmarkActions.js
katello-4.13.0.rc1 webpack/components/Bookmark/BookmarkActions.js
katello-4.12.0 webpack/components/Bookmark/BookmarkActions.js
katello-4.12.0.rc3 webpack/components/Bookmark/BookmarkActions.js
katello-4.12.0.rc2 webpack/components/Bookmark/BookmarkActions.js
katello-4.12.0.rc1 webpack/components/Bookmark/BookmarkActions.js
katello-4.11.1 webpack/components/Bookmark/BookmarkActions.js
katello-4.11.0 webpack/components/Bookmark/BookmarkActions.js