aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/dispatcher.js
blob: b4e22ed9bbe37ba938032cf89da149dcc21b035e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import flux from "flux";

const PayloadSources = {
    VIEW: "view",
    SERVER: "server"
};


export var AppDispatcher = new flux.Dispatcher();
AppDispatcher.dispatchViewAction = function (action) {
    action.source = PayloadSources.VIEW;
    this.dispatch(action);
};
AppDispatcher.dispatchServerAction = function (action) {
    action.source = PayloadSources.SERVER;
    this.dispatch(action);
};