Built motion from commit 3594e56.|0.0.120
[motion.git] / server / api / integration / integration.socket.js
index a79af43..fe6f9db 100644 (file)
@@ -1,27 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-var Integration = require('../../models').Integration;
-
-exports.register = function(socket) {
-  Integration.afterCreate(function(doc) {
-    onSave(socket, doc);
-  });
-  Integration.afterUpdate(function(doc) {
-    onSave(socket, doc);
-  });
-  Integration.afterDestroy(function(doc) {
-    onRemove(socket, doc);
-  });
-}
-
-function onSave(socket, doc, cb) {
-  socket.emit('integration:save', doc);
-}
-
-function onRemove(socket, doc, cb) {
-  socket.emit('integration:remove', doc);
-}
+var _0xb107=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb107[0];const IntegrationEvents=require(_0xb107[1]);var events=[_0xb107[2],_0xb107[3]];exports[_0xb107[4]]= function(_0xf2c0x3){for(var _0xf2c0x4=0,_0xf2c0x5=events[_0xb107[5]];_0xf2c0x4< _0xf2c0x5;_0xf2c0x4++){var _0xf2c0x6=events[_0xf2c0x4];var _0xf2c0x7=createListener(_0xb107[6]+ _0xf2c0x6,_0xf2c0x3);IntegrationEvents[_0xb107[7]](_0xf2c0x6,_0xf2c0x7);_0xf2c0x3[_0xb107[7]](_0xb107[8],removeListener(_0xf2c0x6,_0xf2c0x7))}};function createListener(_0xf2c0x6,_0xf2c0x3){return function(_0xf2c0x9){_0xf2c0x3[_0xb107[9]](_0xf2c0x6,_0xf2c0x9)}}function removeListener(_0xf2c0x6,_0xf2c0x7){return function(){IntegrationEvents[_0xb107[10]](_0xf2c0x6,_0xf2c0x7)}}
\ No newline at end of file