Built motion from commit 362b9399b4d0ed5560fbb795af995925d345fc38. Version 3.0.0...
[motion-next.git] / server / api / user / user.events.js
index ef1fe20..c1fb2e6 100644 (file)
@@ -1 +1 @@
-const a776_0x9d9c=['remove','update','addHook','events','User','undefined','save','emit','setMaxListeners'];(function(_0x40112a,_0x3120c8){const _0x9d9cd1=function(_0x575af4){while(--_0x575af4){_0x40112a['push'](_0x40112a['shift']());}};_0x9d9cd1(++_0x3120c8);}(a776_0x9d9c,0x132));const a776_0x575a=function(_0x40112a,_0x3120c8){_0x40112a=_0x40112a-0x17d;let _0x9d9cd1=a776_0x9d9c[_0x40112a];return _0x9d9cd1;};const a776_0x5c9411=a776_0x575a;'use strict';const EventEmitter=require(a776_0x5c9411(0x180)),User=require('../../mysqldb')['db'][a776_0x5c9411(0x181)],UserEvents=new EventEmitter();UserEvents[a776_0x5c9411(0x185)](0x0);const events={'afterCreate':a776_0x5c9411(0x183),'afterUpdate':a776_0x5c9411(0x17e),'afterDestroy':a776_0x5c9411(0x17d)};function emitEvent(_0x2bfe2b){return function(_0x2b5db4){const _0x514bdf=a776_0x575a;UserEvents[_0x514bdf(0x184)](_0x2bfe2b+':'+_0x2b5db4['id'],_0x2b5db4),UserEvents[_0x514bdf(0x184)](_0x2bfe2b,_0x2b5db4);};}for(const e in events){if(typeof events[e]!==a776_0x5c9411(0x182)){const event=events[e];User[a776_0x5c9411(0x17f)](e,emitEvent(event));}}module['exports']=UserEvents;
\ No newline at end of file
+const a776_0x3129=['emit','undefined','setMaxListeners','save','exports','../../mysqldb','update'];(function(_0x31f87c,_0x3e3f90){const _0x312995=function(_0x794fc1){while(--_0x794fc1){_0x31f87c['push'](_0x31f87c['shift']());}};_0x312995(++_0x3e3f90);}(a776_0x3129,0xcf));const a776_0x794f=function(_0x31f87c,_0x3e3f90){_0x31f87c=_0x31f87c-0x1f2;let _0x312995=a776_0x3129[_0x31f87c];return _0x312995;};const a776_0xeba66=a776_0x794f;'use strict';const EventEmitter=require('events'),User=require(a776_0xeba66(0x1f3))['db']['User'],UserEvents=new EventEmitter();UserEvents[a776_0xeba66(0x1f7)](0x0);const events={'afterCreate':a776_0xeba66(0x1f8),'afterUpdate':a776_0xeba66(0x1f4),'afterDestroy':'remove'};function emitEvent(_0x27d7cd){return function(_0x5dafe1){const _0x2ce40c=a776_0x794f;UserEvents[_0x2ce40c(0x1f5)](_0x27d7cd+':'+_0x5dafe1['id'],_0x5dafe1),UserEvents['emit'](_0x27d7cd,_0x5dafe1);};}for(const e in events){if(typeof events[e]!==a776_0xeba66(0x1f6)){const event=events[e];User['addHook'](e,emitEvent(event));}}module[a776_0xeba66(0x1f2)]=UserEvents;
\ No newline at end of file