aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/dispatcher.js
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-02-18 12:29:35 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-02-18 12:29:35 +0100
commit18b619e164ced91cf0ac8d3fd3c18be1f07df1cc (patch)
tree071bce256f44f063a2a4b412f43ff2f2b7d3ed5f /web/src/js/dispatcher.js
parent3cbacf4e0bae8cd96752303b42f88e176e638824 (diff)
downloadmitmproxy-18b619e164ced91cf0ac8d3fd3c18be1f07df1cc.tar.gz
mitmproxy-18b619e164ced91cf0ac8d3fd3c18be1f07df1cc.tar.bz2
mitmproxy-18b619e164ced91cf0ac8d3fd3c18be1f07df1cc.zip
move mitmproxy/web to root
Diffstat (limited to 'web/src/js/dispatcher.js')
-rw-r--r--web/src/js/dispatcher.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/web/src/js/dispatcher.js b/web/src/js/dispatcher.js
new file mode 100644
index 00000000..0c2aa202
--- /dev/null
+++ b/web/src/js/dispatcher.js
@@ -0,0 +1,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
+}; \ No newline at end of file