Built motion from commit 05106a3.|0.0.33
[motion.git] / server / api / report_integration / report_integration.socket.js
index 2bd59ab..e03a3ee 100644 (file)
@@ -1,23 +1 @@
-/**
- * Broadcast integrations update when the model changes
- */
-
-'use strict';
-
-var util = require('util');
-var ReportIntegration = require('../../models').ReportIntegration;
-
-exports.register = function(socket) {
-  ReportIntegration.afterCreate(function(doc) {
-    onSave(socket, doc);
-  });
-}
-
-function onSave(socket, doc, cb) {
-  console.log('socket name is ', socket.name);
-  console.log('doc membername is ', doc.membername);
-  if (socket.name === doc.membername) {
-    console.log('emitting');
-    socket.emit(util.format('report_integration:%s', doc.integration), doc);
-  }
-}
+var _0x8767=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x6F\x63\x6B\x65\x74\x20\x6E\x61\x6D\x65\x20\x69\x73\x20","\x6E\x61\x6D\x65","\x6C\x6F\x67","\x64\x6F\x63\x20\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65\x20\x69\x73\x20","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x65\x6D\x69\x74\x74\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x25\x73","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x61\x74","\x65\x6D\x69\x74"];_0x8767[0];var util=require(_0x8767[1]);var ReportIntegration=require(_0x8767[3])[_0x8767[2]];exports[_0x8767[4]]=function(_0x3359x3){ReportIntegration[_0x8767[5]](function(_0x3359x4){onSave(_0x3359x3,_0x3359x4)})};function onSave(_0x3359x3,_0x3359x4,_0x3359x6){console[_0x8767[8]](_0x8767[6],_0x3359x3[_0x8767[7]]);console[_0x8767[8]](_0x8767[9],_0x3359x4[_0x8767[10]]);if(_0x3359x3[_0x8767[7]]===_0x3359x4[_0x8767[10]]){console[_0x8767[8]](_0x8767[11]);_0x3359x3[_0x8767[15]](util[_0x8767[14]](_0x8767[12],_0x3359x4[_0x8767[13]]),_0x3359x4);};}
\ No newline at end of file