Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / cmContact / cmContact.events.js
index 1fc8572..737810e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5992=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners','save','update'];(function(_0x424f2e,_0x1c3e1a){var _0x4bee9a=function(_0x150fa1){while(--_0x150fa1){_0x424f2e['push'](_0x424f2e['shift']());}};_0x4bee9a(++_0x1c3e1a);}(_0x5992,0x177));var _0x2599=function(_0x24061a,_0x1c9f4d){_0x24061a=_0x24061a-0x0;var _0x82054e=_0x5992[_0x24061a];return _0x82054e;};'use strict';var EventEmitter=require(_0x2599('0x0'));var CmContact=require(_0x2599('0x1'))['db']['CmContact'];var CmContactEvents=new EventEmitter();CmContactEvents[_0x2599('0x2')](0x0);var events={'afterCreate':_0x2599('0x3'),'afterUpdate':_0x2599('0x4'),'afterDestroy':_0x2599('0x5')};function emitEvent(_0x6becd8){return function(_0x412dcc,_0x48568f,_0x3863f5){CmContactEvents['emit'](_0x6becd8+':'+_0x412dcc['id'],_0x412dcc);CmContactEvents[_0x2599('0x6')](_0x6becd8,_0x412dcc);_0x3863f5(null);};}for(var e in events){if(events[_0x2599('0x7')](e)){var event=events[e];CmContact[_0x2599('0x8')](e,emitEvent(event));}}module[_0x2599('0x9')]=CmContactEvents;
\ No newline at end of file
+var _0x7a98=['hook','CmContact','remove','emit','hasOwnProperty'];(function(_0x469ccf,_0x1897a3){var _0x425e20=function(_0x34f716){while(--_0x34f716){_0x469ccf['push'](_0x469ccf['shift']());}};_0x425e20(++_0x1897a3);}(_0x7a98,0x18c));var _0x87a9=function(_0x40f9ca,_0xfbe7fb){_0x40f9ca=_0x40f9ca-0x0;var _0x596ba5=_0x7a98[_0x40f9ca];return _0x596ba5;};'use strict';var EventEmitter=require('events');var CmContact=require('../../mysqldb')['db'][_0x87a9('0x0')];var CmContactEvents=new EventEmitter();CmContactEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x87a9('0x1')};function emitEvent(_0x257bae){return function(_0xd09f98,_0x32bffa,_0x47fd5b){CmContactEvents[_0x87a9('0x2')](_0x257bae+':'+_0xd09f98['id'],_0xd09f98);CmContactEvents[_0x87a9('0x2')](_0x257bae,_0xd09f98);_0x47fd5b(null);};}for(var e in events){if(events[_0x87a9('0x3')](e)){var event=events[e];CmContact[_0x87a9('0x4')](e,emitEvent(event));}}module['exports']=CmContactEvents;
\ No newline at end of file