aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/actions.js
blob: e55a1d16213282611962b2d0864ffed794ec9694 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var ActionTypes = {
    UPDATE_SETTINGS: "update_settings",
    ADD_EVENT: "add_event"
};

var SettingsActions = {
    update: function (settings) {
        settings = _.merge({}, SettingsStore.getAll(), settings);
        //TODO: Update server.

        //Facebook Flux: We do an optimistic update on the client already.
        AppDispatcher.dispatchViewAction({
            type: ActionTypes.UPDATE_SETTINGS,
            settings: settings
        });
    }
};