Built motion from commit 5e31ea4.|0.0.32
[motion.git] / server / api / telephone / telephone.socket.js
index 0ae1af0..11f6d7a 100644 (file)
@@ -1 +1,24 @@
-var _0x4cf7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x72\x65\x67\x69\x73\x74\x65\x72","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x4cf7[0];exports[_0x4cf7[1]]=function(_0x25a1x1){};function onSave(_0x25a1x1,_0x25a1x3,_0x25a1x4){_0x25a1x1[_0x4cf7[3]](_0x4cf7[2],_0x25a1x3)}function onRemove(_0x25a1x1,_0x25a1x3,_0x25a1x4){_0x25a1x1[_0x4cf7[3]](_0x4cf7[4],_0x25a1x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+// var Telephone = require('../../models').Telephone;
+
+exports.register = function (socket) {
+  // Telephone.afterCreate(function(doc) {
+  //   onSave(socket, doc);
+  // });
+  // Telephone.afterDestroy(function(doc) {
+  //   onRemove(socket, doc);
+  // });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('telephone:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('telephone:remove', doc);
+}