mitmproxy/web/src/js/dispatcher.js
2016-02-29 02:57:35 +01:00

18 lines
401 B
JavaScript

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