Sha256: 59d604953b0a1af2b1dc57727e9d3e9e00df435b8d579e1f3e924dd1022f7f5a

Contents?: true

Size: 580 Bytes

Versions: 31

Compression:

Stored size: 580 Bytes

Contents

import { foremanApi as api } from '../../services/api';

import {
  GET_SETTING_REQUEST,
  GET_SETTING_SUCCESS,
  GET_SETTING_FAILURE,
} from './SettingsConstants';

export const loadSetting = settingName => (dispatch) => {
  dispatch({ type: GET_SETTING_REQUEST });

  return api
    .get(`/settings/${settingName}`)
    .then(({ data }) => {
      dispatch({
        type: GET_SETTING_SUCCESS,
        response: data,
      });
    })
    .catch((result) => {
      dispatch({
        type: GET_SETTING_FAILURE,
        result,
      });
    });
};

export default loadSetting;

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
katello-3.12.3 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.12.2 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.12.1 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.11.2 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.10.2 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.12.0 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.12.0.rc2 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.10.1.1 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.12.0.rc1 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.10.1 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.11.1 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.11.0 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.11.0.rc2 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.11.0.rc1 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.10.0 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.10.0.rc1.1 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.9.1 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.10.0.rc1 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.9.0 webpack/move_to_foreman/Settings/SettingsActions.js
katello-3.8.1 webpack/move_to_foreman/Settings/SettingsActions.js