Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / pause / pause.rpc.js
index d677fcf..99208c7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x62c0=['options','raw','where','attributes','include','map','model','then','ShowPause','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','Pause,\x20%s,\x20%s','request\x20sent','Pause,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','Pause'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x62c0,0x1d9));var _0x062c=function(_0x393500,_0x1037af){_0x393500=_0x393500-0x0;var _0x120d3b=_0x62c0[_0x393500];return _0x120d3b;};'use strict';var _=require('lodash');var util=require(_0x062c('0x0'));var moment=require(_0x062c('0x1'));var BPromise=require(_0x062c('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x062c('0x3'));var db=require(_0x062c('0x4'))['db'];var utils=require(_0x062c('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x062c('0x6'));var jayson=require(_0x062c('0x7'));var client=jayson[_0x062c('0x8')][_0x062c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x51566f,_0x30fb9f,_0x1a0309){return new BPromise(function(_0x53ccb3,_0x2d2f65){return client[_0x062c('0xa')](_0x51566f,_0x1a0309)['then'](function(_0x101c85){logger['info'](_0x062c('0xb'),_0x30fb9f,_0x062c('0xc'));logger['debug'](_0x062c('0xd'),_0x30fb9f,_0x062c('0xc'),JSON[_0x062c('0xe')](_0x101c85));if(_0x101c85[_0x062c('0xf')]){if(_0x101c85[_0x062c('0xf')][_0x062c('0x10')]===0x1f4){logger[_0x062c('0xf')](_0x062c('0xb'),_0x30fb9f,_0x101c85[_0x062c('0xf')][_0x062c('0x11')]);return _0x2d2f65(_0x101c85[_0x062c('0xf')]['message']);}logger[_0x062c('0xf')](_0x062c('0xb'),_0x30fb9f,_0x101c85['error'][_0x062c('0x11')]);return _0x53ccb3(_0x101c85[_0x062c('0xf')][_0x062c('0x11')]);}else{logger[_0x062c('0x12')]('Pause,\x20%s,\x20%s',_0x30fb9f,_0x062c('0xc'));_0x53ccb3(_0x101c85['result']['message']);}})['catch'](function(_0x1df60c){logger[_0x062c('0xf')]('Pause,\x20%s,\x20%s',_0x30fb9f,_0x1df60c);_0x2d2f65(_0x1df60c);});});}exports['ShowPause']=function(_0x3ed6fd){var _0x1106b7=this;return new Promise(function(_0xe79571,_0x20a3c9){return db[_0x062c('0x13')]['find']({'raw':_0x3ed6fd[_0x062c('0x14')]?_0x3ed6fd[_0x062c('0x14')][_0x062c('0x15')]===undefined?!![]:![]:!![],'where':_0x3ed6fd[_0x062c('0x14')]?_0x3ed6fd['options'][_0x062c('0x16')]||null:null,'attributes':_0x3ed6fd[_0x062c('0x14')]?_0x3ed6fd[_0x062c('0x14')][_0x062c('0x17')]||null:null,'include':_0x3ed6fd[_0x062c('0x14')]?_0x3ed6fd['options'][_0x062c('0x18')]?_[_0x062c('0x19')](_0x3ed6fd[_0x062c('0x14')]['include'],function(_0x2a02c3){return{'model':db[_0x2a02c3[_0x062c('0x1a')]],'as':_0x2a02c3['as'],'attributes':_0x2a02c3[_0x062c('0x17')],'include':_0x2a02c3['include']?_['map'](_0x2a02c3[_0x062c('0x18')],function(_0x4ba627){return{'model':db[_0x4ba627[_0x062c('0x1a')]],'as':_0x4ba627['as'],'attributes':_0x4ba627['attributes'],'include':_0x4ba627['include']?_['map'](_0x4ba627[_0x062c('0x18')],function(_0x37397a){return{'model':db[_0x37397a[_0x062c('0x1a')]],'as':_0x37397a['as'],'attributes':_0x37397a[_0x062c('0x17')]};}):[]};}):[]};}):[]:[]})[_0x062c('0x1b')](function(_0x4dbb28){logger[_0x062c('0x12')](_0x062c('0x1c'),_0x3ed6fd);logger['debug'](_0x062c('0x1c'),_0x3ed6fd,JSON[_0x062c('0xe')](_0x4dbb28));_0xe79571(_0x4dbb28);})['catch'](function(_0xfd324e){logger[_0x062c('0xf')](_0x062c('0x1c'),_0xfd324e[_0x062c('0x11')],_0x3ed6fd);_0x20a3c9(_0x1106b7[_0x062c('0xf')](0x1f4,_0xfd324e[_0x062c('0x11')]));});});};
\ No newline at end of file
+var _0x96fa=['include','map','model','debug','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','Pause,\x20%s,\x20%s','request\x20sent','Pause,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','ShowPause','Pause','find','options','attributes'];(function(_0x3675f6,_0x508200){var _0x488c78=function(_0x3fbb5f){while(--_0x3fbb5f){_0x3675f6['push'](_0x3675f6['shift']());}};_0x488c78(++_0x508200);}(_0x96fa,0xc4));var _0xa96f=function(_0x36bdc8,_0x3a1154){_0x36bdc8=_0x36bdc8-0x0;var _0x1f8a26=_0x96fa[_0x36bdc8];return _0x1f8a26;};'use strict';var _=require(_0xa96f('0x0'));var util=require(_0xa96f('0x1'));var moment=require(_0xa96f('0x2'));var BPromise=require(_0xa96f('0x3'));var rs=require(_0xa96f('0x4'));var fs=require('fs');var Redis=require(_0xa96f('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xa96f('0x6'));var logger=require(_0xa96f('0x7'))(_0xa96f('0x8'));var config=require('../../config/environment');var jayson=require(_0xa96f('0x9'));var client=jayson[_0xa96f('0xa')][_0xa96f('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4e9c8b,_0x3dcf92,_0x2be1b7){return new BPromise(function(_0x28494d,_0x3d37bb){return client[_0xa96f('0xc')](_0x4e9c8b,_0x2be1b7)[_0xa96f('0xd')](function(_0x2f12e7){logger['info'](_0xa96f('0xe'),_0x3dcf92,_0xa96f('0xf'));logger['debug'](_0xa96f('0x10'),_0x3dcf92,'request\x20sent',JSON[_0xa96f('0x11')](_0x2f12e7));if(_0x2f12e7[_0xa96f('0x12')]){if(_0x2f12e7[_0xa96f('0x12')]['code']===0x1f4){logger['error'](_0xa96f('0xe'),_0x3dcf92,_0x2f12e7[_0xa96f('0x12')][_0xa96f('0x13')]);return _0x3d37bb(_0x2f12e7[_0xa96f('0x12')][_0xa96f('0x13')]);}logger[_0xa96f('0x12')](_0xa96f('0xe'),_0x3dcf92,_0x2f12e7[_0xa96f('0x12')]['message']);return _0x28494d(_0x2f12e7[_0xa96f('0x12')][_0xa96f('0x13')]);}else{logger[_0xa96f('0x14')](_0xa96f('0xe'),_0x3dcf92,_0xa96f('0xf'));_0x28494d(_0x2f12e7[_0xa96f('0x15')]['message']);}})[_0xa96f('0x16')](function(_0x3caaed){logger['error']('Pause,\x20%s,\x20%s',_0x3dcf92,_0x3caaed);_0x3d37bb(_0x3caaed);});});}exports[_0xa96f('0x17')]=function(_0x27ff1b){var _0x5f314e=this;return new Promise(function(_0x43c489,_0x3ca9ae){return db[_0xa96f('0x18')][_0xa96f('0x19')]({'raw':_0x27ff1b[_0xa96f('0x1a')]?_0x27ff1b[_0xa96f('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x27ff1b[_0xa96f('0x1a')]?_0x27ff1b[_0xa96f('0x1a')]['where']||null:null,'attributes':_0x27ff1b['options']?_0x27ff1b[_0xa96f('0x1a')][_0xa96f('0x1b')]||null:null,'include':_0x27ff1b['options']?_0x27ff1b[_0xa96f('0x1a')][_0xa96f('0x1c')]?_[_0xa96f('0x1d')](_0x27ff1b[_0xa96f('0x1a')][_0xa96f('0x1c')],function(_0x2c51a2){return{'model':db[_0x2c51a2['model']],'as':_0x2c51a2['as'],'attributes':_0x2c51a2['attributes'],'include':_0x2c51a2[_0xa96f('0x1c')]?_[_0xa96f('0x1d')](_0x2c51a2[_0xa96f('0x1c')],function(_0x92472){return{'model':db[_0x92472[_0xa96f('0x1e')]],'as':_0x92472['as'],'attributes':_0x92472[_0xa96f('0x1b')],'include':_0x92472[_0xa96f('0x1c')]?_['map'](_0x92472[_0xa96f('0x1c')],function(_0x337245){return{'model':db[_0x337245[_0xa96f('0x1e')]],'as':_0x337245['as'],'attributes':_0x337245['attributes']};}):[]};}):[]};}):[]:[]})[_0xa96f('0xd')](function(_0x3ff0e0){logger[_0xa96f('0x14')](_0xa96f('0x17'),_0x27ff1b);logger[_0xa96f('0x1f')]('ShowPause',_0x27ff1b,JSON[_0xa96f('0x11')](_0x3ff0e0));_0x43c489(_0x3ff0e0);})[_0xa96f('0x16')](function(_0x3e241c){logger[_0xa96f('0x12')](_0xa96f('0x17'),_0x3e241c[_0xa96f('0x13')],_0x27ff1b);_0x3ca9ae(_0x5f314e[_0xa96f('0x12')](0x1f4,_0x3e241c[_0xa96f('0x13')]));});});};
\ No newline at end of file