Built motion from commit aab208717af8d15f4fa224cdb6a202877019af9b. Version 3.0.0...
[motion-next.git] / server / api / userVoiceQueueRt / userVoiceQueueRt.rpc.js
1 const a690_0x1069=['COUNT','debug','where','rpc','../../rediscache','options','GetVoiceQueueRtPauses','message','error','stringify','catch','UserVoiceQueueRt','findAll','../../config/logger','register','../../mysqldb'];(function(_0x300e1d,_0x106914){const _0x1e041d=function(_0x4e2088){while(--_0x4e2088){_0x300e1d['push'](_0x300e1d['shift']());}};_0x1e041d(++_0x106914);}(a690_0x1069,0x175));const a690_0x1e04=function(_0x300e1d,_0x106914){_0x300e1d=_0x300e1d-0x0;let _0x1e041d=a690_0x1069[_0x300e1d];return _0x1e041d;};const _0x5a8cee=a690_0x1e04;'use strict';const db=require(_0x5a8cee('0xa'))['db'],{fn,literal}=require('sequelize'),logger=require(_0x5a8cee('0x8'))(_0x5a8cee('0xe')),{getSocket}=require(_0x5a8cee('0xf')),socket=getSocket();require('./userVoiceQueueRt.socket')[_0x5a8cee('0x9')](socket),exports[_0x5a8cee('0x1')]=function(_0x4e2088){const _0x50f8e6=this;return new Promise(function(_0x665a94,_0x413803){const _0x3f2b01=a690_0x1e04;return db[_0x3f2b01('0x6')][_0x3f2b01('0x7')]({'raw':_0x4e2088[_0x3f2b01('0x0')]?_0x4e2088[_0x3f2b01('0x0')]['raw']===undefined?!![]:![]:!![],'where':_0x4e2088[_0x3f2b01('0x0')]?_0x4e2088[_0x3f2b01('0x0')][_0x3f2b01('0xd')]||null:null,'attributes':[[fn(_0x3f2b01('0xb'),fn('IF',literal('`paused`\x20=\x201,\x201,\x20null'))),'outboundQueuePauses']]})['then'](function(_0x14c325){const _0x15d176=_0x3f2b01;logger['info'](_0x15d176('0x1'),_0x4e2088),logger[_0x15d176('0xc')](_0x15d176('0x1'),_0x4e2088,JSON[_0x15d176('0x4')](_0x14c325)),_0x665a94(_0x14c325);})[_0x3f2b01('0x5')](function(_0x306c2c){const _0x3ce52e=_0x3f2b01;logger[_0x3ce52e('0x3')]('GetVoiceQueueRtPauses',_0x306c2c[_0x3ce52e('0x2')],_0x4e2088),_0x413803(_0x50f8e6['error'](0x1f4,_0x306c2c[_0x3ce52e('0x2')]));});});};