Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / api / userProfile / userProfile.events.js
1 const a668_0x3869=['exports','undefined','update','addHook','save','../../mysqldb','events'];(function(_0x3e6434,_0x38698c){const _0x4e970e=function(_0x12fa4a){while(--_0x12fa4a){_0x3e6434['push'](_0x3e6434['shift']());}};_0x4e970e(++_0x38698c);}(a668_0x3869,0x146));const a668_0x4e97=function(_0x3e6434,_0x38698c){_0x3e6434=_0x3e6434-0x0;let _0x4e970e=a668_0x3869[_0x3e6434];return _0x4e970e;};const _0x17c221=a668_0x4e97;'use strict';const EventEmitter=require(_0x17c221('0x2')),UserProfile=require(_0x17c221('0x1'))['db']['UserProfile'],UserProfileEvents=new EventEmitter();UserProfileEvents['setMaxListeners'](0x0);const events={'afterCreate':_0x17c221('0x0'),'afterUpdate':_0x17c221('0x5'),'afterDestroy':'remove'};function emitEvent(_0x12fa4a){return function(_0x563136){UserProfileEvents['emit'](_0x12fa4a+':'+_0x563136['id'],_0x563136),UserProfileEvents['emit'](_0x12fa4a,_0x563136);};}for(const e in events){if(typeof events[e]!==_0x17c221('0x4')){const event=events[e];UserProfile[_0x17c221('0x6')](e,emitEvent(event));}}module[_0x17c221('0x3')]=UserProfileEvents;