about summary refs log tree commit diff
path: root/app/javascript/mastodon/actions/settings.js
blob: 2d260b84c5afcd5fe0113bb891629a125a7bb4ef (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(),
    });
  };
};