Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / cmContact / cmContact.events.js
index f44f82c..737810e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x15d7=['save','update','emit','hasOwnProperty','exports','events','CmContact','setMaxListeners'];(function(_0x1147fc,_0x42b6d0){var _0x5e7d55=function(_0x232465){while(--_0x232465){_0x1147fc['push'](_0x1147fc['shift']());}};_0x5e7d55(++_0x42b6d0);}(_0x15d7,0x1b5));var _0x715d=function(_0x586b44,_0x1832fe){_0x586b44=_0x586b44-0x0;var _0x51e0c9=_0x15d7[_0x586b44];return _0x51e0c9;};'use strict';var EventEmitter=require(_0x715d('0x0'));var CmContact=require('../../mysqldb')['db'][_0x715d('0x1')];var CmContactEvents=new EventEmitter();CmContactEvents[_0x715d('0x2')](0x0);var events={'afterCreate':_0x715d('0x3'),'afterUpdate':_0x715d('0x4'),'afterDestroy':'remove'};function emitEvent(_0x2120ed){return function(_0x13c9f3,_0x1fa6e5,_0x4c46fe){CmContactEvents[_0x715d('0x5')](_0x2120ed+':'+_0x13c9f3['id'],_0x13c9f3);CmContactEvents['emit'](_0x2120ed,_0x13c9f3);_0x4c46fe(null);};}for(var e in events){if(events[_0x715d('0x6')](e)){var event=events[e];CmContact['hook'](e,emitEvent(event));}}module[_0x715d('0x7')]=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