16b9fc13dff54c9d1408ee0ba2a953346e53e070
[motion-next.git] / server / api / voiceQueue / voiceQueue.events.js
1 const a754_0x32b8=['save','update','undefined','remove','../../mysqldb','emit','events','VoiceQueue'];(function(_0x1e478a,_0x32b8a5){const _0x2fc2eb=function(_0x117e61){while(--_0x117e61){_0x1e478a['push'](_0x1e478a['shift']());}};_0x2fc2eb(++_0x32b8a5);}(a754_0x32b8,0xb9));const a754_0x2fc2=function(_0x1e478a,_0x32b8a5){_0x1e478a=_0x1e478a-0x0;let _0x2fc2eb=a754_0x32b8[_0x1e478a];return _0x2fc2eb;};const _0xee6a4f=a754_0x2fc2;'use strict';const EventEmitter=require(_0xee6a4f('0x5')),VoiceQueue=require(_0xee6a4f('0x3'))['db'][_0xee6a4f('0x6')],VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);const events={'afterCreate':_0xee6a4f('0x7'),'afterUpdate':_0xee6a4f('0x0'),'afterDestroy':_0xee6a4f('0x2')};function emitEvent(_0x117e61){return function(_0x3d8ad7){const _0x370437=a754_0x2fc2;VoiceQueueEvents['emit'](_0x117e61+':'+_0x3d8ad7['id'],_0x3d8ad7),VoiceQueueEvents[_0x370437('0x4')](_0x117e61,_0x3d8ad7);};}for(const e in events){if(typeof events[e]!==_0xee6a4f('0x1')){const event=events[e];VoiceQueue['addHook'](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;