about summary refs log tree commit diff
path: root/app/assets/javascripts/components/actions/settings.jsx
blob: c754b30ca2fc4d1656e61c5f55dafc957e9ce9cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import axios from 'axios';

export const SETTING_CHANGE = 'SETTING_CHANGE';

export function changeSetting(key, value) {
  return {
    type: SETTING_CHANGE,
    key,
    value
  };
};

export function saveSettings() {
  return (_, getState) => {
    axios.put('/api/web/settings', {
      data: getState().get('settings').toJS()
    });
  };
};