9dd2f77c081caca81f4e7dac2fcc9c79c45bea04
[motion-next.git] / server / api / voiceQueueReport / voiceQueueReport.events.js
1 const a761_0x4f95=['update','events','../../mysqldb','VoiceQueueReport','remove','undefined','emit','setMaxListeners'];(function(_0xc0a317,_0x4f9515){const _0x1965bf=function(_0x38fcaa){while(--_0x38fcaa){_0xc0a317['push'](_0xc0a317['shift']());}};_0x1965bf(++_0x4f9515);}(a761_0x4f95,0x103));const a761_0x1965=function(_0xc0a317,_0x4f9515){_0xc0a317=_0xc0a317-0x0;let _0x1965bf=a761_0x4f95[_0xc0a317];return _0x1965bf;};const _0x5b80f5=a761_0x1965;'use strict';const EventEmitter=require(_0x5b80f5('0x6')),VoiceQueueReport=require(_0x5b80f5('0x7'))['db'][_0x5b80f5('0x0')],VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x5b80f5('0x4')](0x0);const events={'afterCreate':'save','afterUpdate':_0x5b80f5('0x5'),'afterDestroy':_0x5b80f5('0x1')};function emitEvent(_0x38fcaa){return function(_0x4f2a1c){const _0x220b4f=a761_0x1965;VoiceQueueReportEvents[_0x220b4f('0x3')](_0x38fcaa+':'+_0x4f2a1c['id'],_0x4f2a1c),VoiceQueueReportEvents[_0x220b4f('0x3')](_0x38fcaa,_0x4f2a1c);};}for(const e in events){if(typeof events[e]!==_0x5b80f5('0x2')){const event=events[e];VoiceQueueReport['addHook'](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;