Built motion from commit 449495f6.|2.6.27
[motion2.git] / server / api / user / user.events.js
index 7e7dcf0..5e07a82 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcd6f=['update','emit','hook','events','../../mysqldb','User','setMaxListeners','save'];(function(_0x39ef64,_0x24cf22){var _0x15e980=function(_0x2d9541){while(--_0x2d9541){_0x39ef64['push'](_0x39ef64['shift']());}};_0x15e980(++_0x24cf22);}(_0xcd6f,0x17b));var _0xfcd6=function(_0x1502ee,_0x546d3c){_0x1502ee=_0x1502ee-0x0;var _0x45c0af=_0xcd6f[_0x1502ee];return _0x45c0af;};'use strict';var EventEmitter=require(_0xfcd6('0x0'));var User=require(_0xfcd6('0x1'))['db'][_0xfcd6('0x2')];var UserEvents=new EventEmitter();UserEvents[_0xfcd6('0x3')](0x0);var events={'afterCreate':_0xfcd6('0x4'),'afterUpdate':_0xfcd6('0x5'),'afterDestroy':'remove'};function emitEvent(_0x2bba44){return function(_0x51475f,_0x43c662,_0x23ae87){UserEvents['emit'](_0x2bba44+':'+_0x51475f['id'],_0x51475f);UserEvents[_0xfcd6('0x6')](_0x2bba44,_0x51475f);_0x23ae87(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];User[_0xfcd6('0x7')](e,emitEvent(event));}}module['exports']=UserEvents;
\ No newline at end of file
+var _0xbf5b=['hook','events','User','setMaxListeners','update','remove','emit','hasOwnProperty'];(function(_0x477e2a,_0x1077c6){var _0xf05896=function(_0x151c36){while(--_0x151c36){_0x477e2a['push'](_0x477e2a['shift']());}};_0xf05896(++_0x1077c6);}(_0xbf5b,0x1c1));var _0xbbf5=function(_0x2c7618,_0x26be9c){_0x2c7618=_0x2c7618-0x0;var _0x5ce3f0=_0xbf5b[_0x2c7618];return _0x5ce3f0;};'use strict';var EventEmitter=require(_0xbbf5('0x0'));var User=require('../../mysqldb')['db'][_0xbbf5('0x1')];var UserEvents=new EventEmitter();UserEvents[_0xbbf5('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xbbf5('0x3'),'afterDestroy':_0xbbf5('0x4')};function emitEvent(_0x10b872){return function(_0x5c6a27,_0x13fa9c,_0x29aaf2){UserEvents['emit'](_0x10b872+':'+_0x5c6a27['id'],_0x5c6a27);UserEvents[_0xbbf5('0x5')](_0x10b872,_0x5c6a27);_0x29aaf2(null);};}for(var e in events){if(events[_0xbbf5('0x6')](e)){var event=events[e];User[_0xbbf5('0x7')](e,emitEvent(event));}}module['exports']=UserEvents;
\ No newline at end of file