aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/web/src/js/dispatcher.js
blob: 0c2aa202e3509831d87c831d01af6b2fd0a8a1e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var flux = require("flux");

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


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);
};

module.exports = {
    AppDispatcher: AppDispatcher
};