Built motion from commit bfc7a72f7045b27461c9a5d1f71c1a658cfd0b8b. Version 3.0.0...
[motion-next.git] / server / api / mailAccount / mailAccount.events.js
1 const a395_0x585c=['update','emit','undefined','remove','save','../../mysqldb','events','exports','addHook','setMaxListeners'];(function(_0x1afeb1,_0x585c17){const _0x1882ee=function(_0x12a988){while(--_0x12a988){_0x1afeb1['push'](_0x1afeb1['shift']());}};_0x1882ee(++_0x585c17);}(a395_0x585c,0x10e));const a395_0x1882=function(_0x1afeb1,_0x585c17){_0x1afeb1=_0x1afeb1-0x0;let _0x1882ee=a395_0x585c[_0x1afeb1];return _0x1882ee;};const _0x4bdbef=a395_0x1882;'use strict';const EventEmitter=require(_0x4bdbef('0x6')),MailAccount=require(_0x4bdbef('0x5'))['db']['MailAccount'],MailAccountEvents=new EventEmitter();MailAccountEvents[_0x4bdbef('0x9')](0x0);const events={'afterCreate':_0x4bdbef('0x4'),'afterUpdate':_0x4bdbef('0x0'),'afterDestroy':_0x4bdbef('0x3')};function emitEvent(_0x12a988){return function(_0x14ee84){const _0xd28ecf=a395_0x1882;MailAccountEvents[_0xd28ecf('0x1')](_0x12a988+':'+_0x14ee84['id'],_0x14ee84),MailAccountEvents[_0xd28ecf('0x1')](_0x12a988,_0x14ee84);};}for(const e in events){if(typeof events[e]!==_0x4bdbef('0x2')){const event=events[e];MailAccount[_0x4bdbef('0x8')](e,emitEvent(event));}}module[_0x4bdbef('0x7')]=MailAccountEvents;