Sha256: 6a7ffc8109638ebad20ee5a982a7b65232f92acd73f06f458407c11d66654e9b

Contents?: true

Size: 530 Bytes

Versions: 12

Compression:

Stored size: 530 Bytes

Contents

import { API_OPERATIONS } from 'foremanReact/redux/API/APIConstants';

const { GET, POST, PUT, DELETE, PATCH } = API_OPERATIONS;

const apiAction = (type, payload) => ({ type, payload });

export const get = payload => apiAction(GET, payload);

export const post = payload => apiAction(POST, payload);

export const put = payload => apiAction(PUT, payload);

export const patch = payload => apiAction(PATCH, payload);

export const APIActions = {
  get,
  post,
  put,
  patch,
  delete: payload => apiAction(DELETE, payload),
};

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
foreman_remote_execution-14.1.1 webpack/__mocks__/foremanReact/redux/API/APIActions.js
foreman_remote_execution-14.1.0 webpack/__mocks__/foremanReact/redux/API/APIActions.js
foreman_remote_execution-14.0.2 webpack/__mocks__/foremanReact/redux/API/APIActions.js
foreman_remote_execution-14.0.1 webpack/__mocks__/foremanReact/redux/API/APIActions.js
foreman_remote_execution-13.2.6 webpack/__mocks__/foremanReact/redux/API/APIActions.js
foreman_remote_execution-14.0.0 webpack/__mocks__/foremanReact/redux/API/APIActions.js
foreman_remote_execution-13.2.5 webpack/__mocks__/foremanReact/redux/API/APIActions.js
foreman_remote_execution-13.2.4 webpack/__mocks__/foremanReact/redux/API/APIActions.js
foreman_remote_execution-13.2.3 webpack/__mocks__/foremanReact/redux/API/APIActions.js
foreman_remote_execution-13.2.2 webpack/__mocks__/foremanReact/redux/API/APIActions.js
foreman_remote_execution-13.2.1 webpack/__mocks__/foremanReact/redux/API/APIActions.js
foreman_remote_execution-13.2.0 webpack/__mocks__/foremanReact/redux/API/APIActions.js