0587ab47e0bbe4630bc68126d3b1e7735d98602a
[motion-next.git] / server / api / voiceQueueReport / voiceQueueReport.events.js
1 const a761_0x3361=['save','exports','undefined','VoiceQueueReport','update','emit','events','../../mysqldb','remove','setMaxListeners','addHook'];(function(_0x1a059f,_0x336140){const _0x25e066=function(_0x14dd26){while(--_0x14dd26){_0x1a059f['push'](_0x1a059f['shift']());}};_0x25e066(++_0x336140);}(a761_0x3361,0x99));const a761_0x25e0=function(_0x1a059f,_0x336140){_0x1a059f=_0x1a059f-0x0;let _0x25e066=a761_0x3361[_0x1a059f];return _0x25e066;};const _0x3f0f15=a761_0x25e0;'use strict';const EventEmitter=require(_0x3f0f15('0x7')),VoiceQueueReport=require(_0x3f0f15('0x8'))['db'][_0x3f0f15('0x4')],VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x3f0f15('0xa')](0x0);const events={'afterCreate':_0x3f0f15('0x1'),'afterUpdate':_0x3f0f15('0x5'),'afterDestroy':_0x3f0f15('0x9')};function emitEvent(_0x14dd26){return function(_0x4e7928){const _0x3a77cf=a761_0x25e0;VoiceQueueReportEvents['emit'](_0x14dd26+':'+_0x4e7928['id'],_0x4e7928),VoiceQueueReportEvents[_0x3a77cf('0x6')](_0x14dd26,_0x4e7928);};}for(const e in events){if(typeof events[e]!==_0x3f0f15('0x3')){const event=events[e];VoiceQueueReport[_0x3f0f15('0x0')](e,emitEvent(event));}}module[_0x3f0f15('0x2')]=VoiceQueueReportEvents;