2 * Broadcast updates to client when the model changes
7 var FaxBusinessAutomation = require('../../models').FaxBusinessAutomation;
9 exports.register = function(socket) {
10 FaxBusinessAutomation.afterCreate(function(doc) {
13 FaxBusinessAutomation.afterUpdate(function(doc, options) {
16 FaxBusinessAutomation.afterDestroy(function(doc) {
17 onRemove(socket, doc);
21 function onSave(socket, doc, cb) {
22 socket.emit('fax_business_automation:save', doc);
25 function onRemove(socket, doc, cb) {
26 socket.emit('fax_business_automation:remove', doc);