Built motion from commit (unavailable).|2.5.0
[motion2.git] / server / api / pause / pause.rpc.js
index 5137f35..c9255c7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4ac0=['Pause,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ShowPause','Pause','options','raw','where','include','attributes','map','model','catch','lodash','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','request','then','info','Pause,\x20%s,\x20%s','request\x20sent'];(function(_0x4c3a81,_0x106112){var _0x41e377=function(_0x48d124){while(--_0x48d124){_0x4c3a81['push'](_0x4c3a81['shift']());}};_0x41e377(++_0x106112);}(_0x4ac0,0xa0));var _0x04ac=function(_0x311c35,_0x534915){_0x311c35=_0x311c35-0x0;var _0x5cc50c=_0x4ac0[_0x311c35];return _0x5cc50c;};'use strict';var _=require(_0x04ac('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x04ac('0x1'));var fs=require('fs');var Redis=require(_0x04ac('0x2'));var db=require(_0x04ac('0x3'))['db'];var utils=require(_0x04ac('0x4'));var logger=require(_0x04ac('0x5'))(_0x04ac('0x6'));var config=require('../../config/environment');var jayson=require(_0x04ac('0x7'));var client=jayson['client'][_0x04ac('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5020a2,_0x1b3b2a,_0x229171){return new BPromise(function(_0x51c524,_0x68d656){return client[_0x04ac('0x9')](_0x5020a2,_0x229171)[_0x04ac('0xa')](function(_0xdb1162){logger[_0x04ac('0xb')](_0x04ac('0xc'),_0x1b3b2a,_0x04ac('0xd'));logger['debug'](_0x04ac('0xe'),_0x1b3b2a,'request\x20sent',JSON[_0x04ac('0xf')](_0xdb1162));if(_0xdb1162[_0x04ac('0x10')]){if(_0xdb1162['error'][_0x04ac('0x11')]===0x1f4){logger[_0x04ac('0x10')](_0x04ac('0xc'),_0x1b3b2a,_0xdb1162['error'][_0x04ac('0x12')]);return _0x68d656(_0xdb1162[_0x04ac('0x10')][_0x04ac('0x12')]);}logger[_0x04ac('0x10')]('Pause,\x20%s,\x20%s',_0x1b3b2a,_0xdb1162[_0x04ac('0x10')][_0x04ac('0x12')]);return _0x51c524(_0xdb1162[_0x04ac('0x10')]['message']);}else{logger[_0x04ac('0xb')](_0x04ac('0xc'),_0x1b3b2a,'request\x20sent');_0x51c524(_0xdb1162['result'][_0x04ac('0x12')]);}})['catch'](function(_0x1da147){logger[_0x04ac('0x10')](_0x04ac('0xc'),_0x1b3b2a,_0x1da147);_0x68d656(_0x1da147);});});}exports[_0x04ac('0x13')]=function(_0x30a78b){var _0x58535a=this;return new Promise(function(_0x154e66,_0x1f213d){return db[_0x04ac('0x14')]['find']({'raw':_0x30a78b[_0x04ac('0x15')]?_0x30a78b['options'][_0x04ac('0x16')]===undefined?!![]:![]:!![],'where':_0x30a78b[_0x04ac('0x15')]?_0x30a78b[_0x04ac('0x15')][_0x04ac('0x17')]||null:null,'attributes':_0x30a78b['options']?_0x30a78b[_0x04ac('0x15')]['attributes']||null:null,'include':_0x30a78b[_0x04ac('0x15')]?_0x30a78b[_0x04ac('0x15')][_0x04ac('0x18')]?_['map'](_0x30a78b[_0x04ac('0x15')][_0x04ac('0x18')],function(_0x443ef1){return{'model':db[_0x443ef1['model']],'as':_0x443ef1['as'],'attributes':_0x443ef1[_0x04ac('0x19')],'include':_0x443ef1[_0x04ac('0x18')]?_[_0x04ac('0x1a')](_0x443ef1['include'],function(_0x364525){return{'model':db[_0x364525[_0x04ac('0x1b')]],'as':_0x364525['as'],'attributes':_0x364525[_0x04ac('0x19')],'include':_0x364525[_0x04ac('0x18')]?_['map'](_0x364525['include'],function(_0x1e0e3a){return{'model':db[_0x1e0e3a['model']],'as':_0x1e0e3a['as'],'attributes':_0x1e0e3a[_0x04ac('0x19')]};}):[]};}):[]};}):[]:[]})[_0x04ac('0xa')](function(_0x17c87e){logger[_0x04ac('0xb')](_0x04ac('0x13'),_0x30a78b);logger['debug']('ShowPause',_0x30a78b,JSON['stringify'](_0x17c87e));_0x154e66(_0x17c87e);})[_0x04ac('0x1c')](function(_0x23ae7b){logger[_0x04ac('0x10')](_0x04ac('0x13'),_0x23ae7b['message'],_0x30a78b);_0x1f213d(_0x58535a[_0x04ac('0x10')](0x1f4,_0x23ae7b['message']));});});};
\ No newline at end of file
+var _0x83f1=['moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','Pause,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','Pause','find','options','raw','where','attributes','map','include','model','ShowPause','catch','lodash','util'];(function(_0x3bd843,_0x153597){var _0x2de0e5=function(_0xff3a77){while(--_0xff3a77){_0x3bd843['push'](_0x3bd843['shift']());}};_0x2de0e5(++_0x153597);}(_0x83f1,0x1cc));var _0x183f=function(_0x5453b6,_0x4bf7ac){_0x5453b6=_0x5453b6-0x0;var _0x16af6a=_0x83f1[_0x5453b6];return _0x16af6a;};'use strict';var _=require(_0x183f('0x0'));var util=require(_0x183f('0x1'));var moment=require(_0x183f('0x2'));var BPromise=require(_0x183f('0x3'));var rs=require(_0x183f('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x183f('0x5'));var logger=require(_0x183f('0x6'))(_0x183f('0x7'));var config=require(_0x183f('0x8'));var jayson=require(_0x183f('0x9'));var client=jayson['client'][_0x183f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xf702f5,_0x364cc4,_0x5c75c3){return new BPromise(function(_0x434be2,_0x5bdf95){return client[_0x183f('0xb')](_0xf702f5,_0x5c75c3)[_0x183f('0xc')](function(_0x37ed60){logger[_0x183f('0xd')](_0x183f('0xe'),_0x364cc4,_0x183f('0xf'));logger[_0x183f('0x10')]('Pause,\x20%s,\x20%s,\x20%s',_0x364cc4,_0x183f('0xf'),JSON[_0x183f('0x11')](_0x37ed60));if(_0x37ed60[_0x183f('0x12')]){if(_0x37ed60[_0x183f('0x12')][_0x183f('0x13')]===0x1f4){logger[_0x183f('0x12')](_0x183f('0xe'),_0x364cc4,_0x37ed60['error'][_0x183f('0x14')]);return _0x5bdf95(_0x37ed60['error']['message']);}logger[_0x183f('0x12')](_0x183f('0xe'),_0x364cc4,_0x37ed60[_0x183f('0x12')][_0x183f('0x14')]);return _0x434be2(_0x37ed60[_0x183f('0x12')]['message']);}else{logger[_0x183f('0xd')]('Pause,\x20%s,\x20%s',_0x364cc4,_0x183f('0xf'));_0x434be2(_0x37ed60[_0x183f('0x15')][_0x183f('0x14')]);}})['catch'](function(_0xe9c5d9){logger[_0x183f('0x12')](_0x183f('0xe'),_0x364cc4,_0xe9c5d9);_0x5bdf95(_0xe9c5d9);});});}exports['ShowPause']=function(_0x284244){var _0x2b819e=this;return new Promise(function(_0x2c3468,_0x3f713f){return db[_0x183f('0x16')][_0x183f('0x17')]({'raw':_0x284244['options']?_0x284244[_0x183f('0x18')][_0x183f('0x19')]===undefined?!![]:![]:!![],'where':_0x284244[_0x183f('0x18')]?_0x284244['options'][_0x183f('0x1a')]||null:null,'attributes':_0x284244['options']?_0x284244[_0x183f('0x18')][_0x183f('0x1b')]||null:null,'include':_0x284244[_0x183f('0x18')]?_0x284244[_0x183f('0x18')]['include']?_[_0x183f('0x1c')](_0x284244[_0x183f('0x18')][_0x183f('0x1d')],function(_0x1d843e){return{'model':db[_0x1d843e[_0x183f('0x1e')]],'as':_0x1d843e['as'],'attributes':_0x1d843e[_0x183f('0x1b')],'include':_0x1d843e[_0x183f('0x1d')]?_[_0x183f('0x1c')](_0x1d843e[_0x183f('0x1d')],function(_0xf09cb){return{'model':db[_0xf09cb['model']],'as':_0xf09cb['as'],'attributes':_0xf09cb[_0x183f('0x1b')],'include':_0xf09cb['include']?_['map'](_0xf09cb[_0x183f('0x1d')],function(_0xf43500){return{'model':db[_0xf43500[_0x183f('0x1e')]],'as':_0xf43500['as'],'attributes':_0xf43500[_0x183f('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x183f('0xc')](function(_0x35d390){logger[_0x183f('0xd')](_0x183f('0x1f'),_0x284244);logger[_0x183f('0x10')](_0x183f('0x1f'),_0x284244,JSON[_0x183f('0x11')](_0x35d390));_0x2c3468(_0x35d390);})[_0x183f('0x20')](function(_0x110853){logger[_0x183f('0x12')](_0x183f('0x1f'),_0x110853[_0x183f('0x14')],_0x284244);_0x3f713f(_0x2b819e[_0x183f('0x12')](0x1f4,_0x110853['message']));});});};
\ No newline at end of file