b5eb440771a7ab513c623ef85ec977028c9546a9
[motion-next.git] / server / api / pause / pause.rpc.js
1 const a512_0x501b=['Pause','options','error','rpc','../../mysqldb','attributes','debug','include','stringify','raw','info','../../config/logger','map','message','model','lodash','findOne','then','catch','ShowPause','where'];(function(_0x4dbaf7,_0x501b4b){const _0x58e791=function(_0x1f9486){while(--_0x1f9486){_0x4dbaf7['push'](_0x4dbaf7['shift']());}};_0x58e791(++_0x501b4b);}(a512_0x501b,0x1a4));const a512_0x58e7=function(_0x4dbaf7,_0x501b4b){_0x4dbaf7=_0x4dbaf7-0x0;let _0x58e791=a512_0x501b[_0x4dbaf7];return _0x58e791;};const _0x32d8de=a512_0x58e7;'use strict';const db=require(_0x32d8de('0x4'))['db'],logger=require(_0x32d8de('0xb'))(_0x32d8de('0x3')),_=require(_0x32d8de('0xf'));exports[_0x32d8de('0x13')]=function(_0x1f9486){const _0x6bbd27=this;return new Promise(function(_0x488710,_0x51bc8f){const _0x20c829=a512_0x58e7;return db[_0x20c829('0x0')][_0x20c829('0x10')]({'raw':_0x1f9486[_0x20c829('0x1')]?_0x1f9486['options'][_0x20c829('0x9')]===undefined?!![]:![]:!![],'where':_0x1f9486[_0x20c829('0x1')]?_0x1f9486[_0x20c829('0x1')][_0x20c829('0x14')]||null:null,'attributes':_0x1f9486[_0x20c829('0x1')]?_0x1f9486['options'][_0x20c829('0x5')]||null:null,'include':_0x1f9486[_0x20c829('0x1')]?_0x1f9486[_0x20c829('0x1')]['include']?_['map'](_0x1f9486[_0x20c829('0x1')][_0x20c829('0x7')],function(_0x4eec49){const _0x272648=_0x20c829;return{'model':db[_0x4eec49[_0x272648('0xe')]],'as':_0x4eec49['as'],'attributes':_0x4eec49[_0x272648('0x5')],'include':_0x4eec49[_0x272648('0x7')]?_[_0x272648('0xc')](_0x4eec49['include'],function(_0x276735){const _0x257b01=_0x272648;return{'model':db[_0x276735[_0x257b01('0xe')]],'as':_0x276735['as'],'attributes':_0x276735[_0x257b01('0x5')],'include':_0x276735['include']?_['map'](_0x276735[_0x257b01('0x7')],function(_0x14ec2a){const _0x5e4d11=_0x257b01;return{'model':db[_0x14ec2a[_0x5e4d11('0xe')]],'as':_0x14ec2a['as'],'attributes':_0x14ec2a[_0x5e4d11('0x5')]};}):[]};}):[]};}):[]:[]})[_0x20c829('0x11')](function(_0x48b068){const _0x3361b5=_0x20c829;logger[_0x3361b5('0xa')]('ShowPause',_0x1f9486),logger[_0x3361b5('0x6')](_0x3361b5('0x13'),_0x1f9486,JSON[_0x3361b5('0x8')](_0x48b068)),_0x488710(_0x48b068);})[_0x20c829('0x12')](function(_0x137d40){const _0x1c6762=_0x20c829;logger[_0x1c6762('0x2')]('ShowPause',_0x137d40[_0x1c6762('0xd')],_0x1f9486),_0x51bc8f(_0x6bbd27['error'](0x1f4,_0x137d40[_0x1c6762('0xd')]));});});};