Built motion from commit 1fa89557.|2.6.10
[motion2.git] / server / api / user / user.events.js
index ffb14dd..a8a37a4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x61dd=['hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners','save','update','emit'];(function(_0x37a1c2,_0x423796){var _0x102d81=function(_0x494223){while(--_0x494223){_0x37a1c2['push'](_0x37a1c2['shift']());}};_0x102d81(++_0x423796);}(_0x61dd,0xff));var _0xd61d=function(_0x50204e,_0x731d94){_0x50204e=_0x50204e-0x0;var _0x67cc32=_0x61dd[_0x50204e];return _0x67cc32;};'use strict';var EventEmitter=require(_0xd61d('0x0'));var User=require(_0xd61d('0x1'))['db']['User'];var UserEvents=new EventEmitter();UserEvents[_0xd61d('0x2')](0x0);var events={'afterCreate':_0xd61d('0x3'),'afterUpdate':_0xd61d('0x4'),'afterDestroy':'remove'};function emitEvent(_0x18c2aa){return function(_0x566c51,_0x5aeb11,_0x5657a4){UserEvents[_0xd61d('0x5')](_0x18c2aa+':'+_0x566c51['id'],_0x566c51);UserEvents[_0xd61d('0x5')](_0x18c2aa,_0x566c51);_0x5657a4(null);};}for(var e in events){if(events[_0xd61d('0x6')](e)){var event=events[e];User[_0xd61d('0x7')](e,emitEvent(event));}}module[_0xd61d('0x8')]=UserEvents;
\ No newline at end of file
+var _0x37e8=['exports','events','../../mysqldb','User','setMaxListeners','update','emit','hasOwnProperty'];(function(_0x74552c,_0x51ce06){var _0xfc27d7=function(_0x1fa991){while(--_0x1fa991){_0x74552c['push'](_0x74552c['shift']());}};_0xfc27d7(++_0x51ce06);}(_0x37e8,0xc9));var _0x837e=function(_0x4de306,_0x9ac209){_0x4de306=_0x4de306-0x0;var _0x34c528=_0x37e8[_0x4de306];return _0x34c528;};'use strict';var EventEmitter=require(_0x837e('0x0'));var User=require(_0x837e('0x1'))['db'][_0x837e('0x2')];var UserEvents=new EventEmitter();UserEvents[_0x837e('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x837e('0x4'),'afterDestroy':'remove'};function emitEvent(_0x5ec6af){return function(_0x2f2a6e,_0x1f0054,_0x15b56b){UserEvents[_0x837e('0x5')](_0x5ec6af+':'+_0x2f2a6e['id'],_0x2f2a6e);UserEvents['emit'](_0x5ec6af,_0x2f2a6e);_0x15b56b(null);};}for(var e in events){if(events[_0x837e('0x6')](e)){var event=events[e];User['hook'](e,emitEvent(event));}}module[_0x837e('0x7')]=UserEvents;
\ No newline at end of file