Built motion from commit 47436d59.|2.6.7
[motion2.git] / server / api / cmContact / cmContact.events.js
index 2992158..de549dc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x040c=['hasOwnProperty','exports','events','CmContact','setMaxListeners','save','remove','emit'];(function(_0x165c96,_0x2269de){var _0x5c2420=function(_0x4e9a1e){while(--_0x4e9a1e){_0x165c96['push'](_0x165c96['shift']());}};_0x5c2420(++_0x2269de);}(_0x040c,0x122));var _0xc040=function(_0x1eb29f,_0x3a68aa){_0x1eb29f=_0x1eb29f-0x0;var _0x3fae14=_0x040c[_0x1eb29f];return _0x3fae14;};'use strict';var EventEmitter=require(_0xc040('0x0'));var CmContact=require('../../mysqldb')['db'][_0xc040('0x1')];var CmContactEvents=new EventEmitter();CmContactEvents[_0xc040('0x2')](0x0);var events={'afterCreate':_0xc040('0x3'),'afterUpdate':'update','afterDestroy':_0xc040('0x4')};function emitEvent(_0x5b71b8){return function(_0x303b94,_0x94fbcb,_0x257b53){CmContactEvents[_0xc040('0x5')](_0x5b71b8+':'+_0x303b94['id'],_0x303b94);CmContactEvents[_0xc040('0x5')](_0x5b71b8,_0x303b94);_0x257b53(null);};}for(var e in events){if(events[_0xc040('0x6')](e)){var event=events[e];CmContact['hook'](e,emitEvent(event));}}module[_0xc040('0x7')]=CmContactEvents;
\ No newline at end of file
+var _0x5e00=['events','../../mysqldb','CmContact','setMaxListeners','update','emit','hasOwnProperty','hook'];(function(_0x25fbef,_0x12f0d4){var _0x58dc4d=function(_0xd7cff0){while(--_0xd7cff0){_0x25fbef['push'](_0x25fbef['shift']());}};_0x58dc4d(++_0x12f0d4);}(_0x5e00,0x78));var _0x05e0=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0x5e00[_0x4565bf];return _0x5610ba;};'use strict';var EventEmitter=require(_0x05e0('0x0'));var CmContact=require(_0x05e0('0x1'))['db'][_0x05e0('0x2')];var CmContactEvents=new EventEmitter();CmContactEvents[_0x05e0('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x05e0('0x4'),'afterDestroy':'remove'};function emitEvent(_0x197e78){return function(_0x57d431,_0x4a02c6,_0xad0748){CmContactEvents[_0x05e0('0x5')](_0x197e78+':'+_0x57d431['id'],_0x57d431);CmContactEvents[_0x05e0('0x5')](_0x197e78,_0x57d431);_0xad0748(null);};}for(var e in events){if(events[_0x05e0('0x6')](e)){var event=events[e];CmContact[_0x05e0('0x7')](e,emitEvent(event));}}module['exports']=CmContactEvents;
\ No newline at end of file