Built motion from commit 459747fdfe53bbf13fbede61eeaffea1f1438f86. Version 3.0.0...
[motion-next.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
1 const a497_0x2da4=['OpenchannelQueue','../../mysqldb','debug','ShowOpenchannelQueue','options','catch','limit','map','../../rediscache','GetOpenchannelQueue','./openchannelQueue.socket','where','model','stringify','error','findOne','then','findAll','attributes','include','info','message','raw','../../config/logger'];(function(_0x2ba7db,_0x2da4a5){const _0x307f65=function(_0x37d8d3){while(--_0x37d8d3){_0x2ba7db['push'](_0x2ba7db['shift']());}};_0x307f65(++_0x2da4a5);}(a497_0x2da4,0x1a4));const a497_0x307f=function(_0x2ba7db,_0x2da4a5){_0x2ba7db=_0x2ba7db-0x0;let _0x307f65=a497_0x2da4[_0x2ba7db];return _0x307f65;};const _0x2fe2d8=a497_0x307f;'use strict';const _=require('lodash'),db=require(_0x2fe2d8('0xd'))['db'],logger=require(_0x2fe2d8('0xb'))('rpc'),{getSocket}=require(_0x2fe2d8('0x14')),socket=getSocket();require(_0x2fe2d8('0x16'))['register'](socket),exports[_0x2fe2d8('0x15')]=function(_0x37d8d3){const _0x40b924=this;return new Promise(function(_0x226dc5,_0x1c7e8b){const _0x4dde09=a497_0x307f;return db[_0x4dde09('0xc')][_0x4dde09('0x5')]({'raw':_0x37d8d3[_0x4dde09('0x10')]?_0x37d8d3[_0x4dde09('0x10')]['raw']===undefined?!![]:![]:!![],'where':_0x37d8d3['options']?_0x37d8d3[_0x4dde09('0x10')][_0x4dde09('0x17')]||null:null,'attributes':_0x37d8d3[_0x4dde09('0x10')]?_0x37d8d3[_0x4dde09('0x10')][_0x4dde09('0x6')]||null:null,'limit':_0x37d8d3['options']?_0x37d8d3[_0x4dde09('0x10')][_0x4dde09('0x12')]||null:null,'include':_0x37d8d3[_0x4dde09('0x10')]?_0x37d8d3['options'][_0x4dde09('0x7')]?_['map'](_0x37d8d3['options'][_0x4dde09('0x7')],function(_0x13611a){const _0x538f90=_0x4dde09;return{'model':db[_0x13611a[_0x538f90('0x0')]],'as':_0x13611a['as'],'attributes':_0x13611a['attributes'],'include':_0x13611a['include']?_[_0x538f90('0x13')](_0x13611a[_0x538f90('0x7')],function(_0x34a010){const _0x5c9119=_0x538f90;return{'model':db[_0x34a010[_0x5c9119('0x0')]],'as':_0x34a010['as'],'attributes':_0x34a010[_0x5c9119('0x6')],'include':_0x34a010[_0x5c9119('0x7')]?_['map'](_0x34a010[_0x5c9119('0x7')],function(_0x3cf234){const _0x2724e8=_0x5c9119;return{'model':db[_0x3cf234[_0x2724e8('0x0')]],'as':_0x3cf234['as'],'attributes':_0x3cf234['attributes']};}):[]};}):[]};}):[]:[]})[_0x4dde09('0x4')](function(_0x26f322){const _0x2990f9=_0x4dde09;logger[_0x2990f9('0x8')](_0x2990f9('0x15'),_0x37d8d3),logger[_0x2990f9('0xe')](_0x2990f9('0x15'),_0x37d8d3,JSON['stringify'](_0x26f322)),_0x226dc5(_0x26f322);})['catch'](function(_0x514d16){const _0x361073=_0x4dde09;logger[_0x361073('0x2')](_0x361073('0x15'),_0x514d16[_0x361073('0x9')],_0x37d8d3),_0x1c7e8b(_0x40b924[_0x361073('0x2')](0x1f4,_0x514d16['message']));});});},exports[_0x2fe2d8('0xf')]=function(_0x3eef49){const _0x2a82db=this;return new Promise(function(_0x5a998e,_0x128a9f){const _0x433306=a497_0x307f;return db[_0x433306('0xc')][_0x433306('0x3')]({'raw':_0x3eef49[_0x433306('0x10')]?_0x3eef49[_0x433306('0x10')][_0x433306('0xa')]===undefined?!![]:![]:!![],'where':_0x3eef49['options']?_0x3eef49['options']['where']||null:null,'attributes':_0x3eef49['options']?_0x3eef49[_0x433306('0x10')][_0x433306('0x6')]||null:null,'include':_0x3eef49[_0x433306('0x10')]?_0x3eef49[_0x433306('0x10')][_0x433306('0x7')]?_[_0x433306('0x13')](_0x3eef49[_0x433306('0x10')][_0x433306('0x7')],function(_0x341d0e){const _0x430749=_0x433306;return{'model':db[_0x341d0e[_0x430749('0x0')]],'as':_0x341d0e['as'],'attributes':_0x341d0e[_0x430749('0x6')],'include':_0x341d0e[_0x430749('0x7')]?_[_0x430749('0x13')](_0x341d0e[_0x430749('0x7')],function(_0xdf9616){const _0x2958eb=_0x430749;return{'model':db[_0xdf9616[_0x2958eb('0x0')]],'as':_0xdf9616['as'],'attributes':_0xdf9616[_0x2958eb('0x6')],'include':_0xdf9616[_0x2958eb('0x7')]?_[_0x2958eb('0x13')](_0xdf9616[_0x2958eb('0x7')],function(_0x1159d9){const _0x54660e=_0x2958eb;return{'model':db[_0x1159d9['model']],'as':_0x1159d9['as'],'attributes':_0x1159d9[_0x54660e('0x6')]};}):[]};}):[]};}):[]:[]})[_0x433306('0x4')](function(_0x378f88){const _0x2e5012=_0x433306;logger[_0x2e5012('0x8')](_0x2e5012('0xf'),_0x3eef49),logger[_0x2e5012('0xe')]('ShowOpenchannelQueue',_0x3eef49,JSON[_0x2e5012('0x1')](_0x378f88)),_0x5a998e(_0x378f88);})[_0x433306('0x11')](function(_0x552779){const _0x35f439=_0x433306;logger[_0x35f439('0x2')](_0x35f439('0xf'),_0x552779[_0x35f439('0x9')],_0x3eef49),_0x128a9f(_0x2a82db[_0x35f439('0x2')](0x1f4,_0x552779[_0x35f439('0x9')]));});});};