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