Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / pause / pause.rpc.js
index ede020f..34cad62 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f97=['debug','Pause,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','ShowPause','find','options','raw','where','attributes','include','model','map','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','request','then','info','Pause,\x20%s,\x20%s'];(function(_0x34aec4,_0x3801da){var _0x51e1a7=function(_0x24e87f){while(--_0x24e87f){_0x34aec4['push'](_0x34aec4['shift']());}};_0x51e1a7(++_0x3801da);}(_0x8f97,0x13e));var _0x78f9=function(_0x46a3ff,_0x470b9a){_0x46a3ff=_0x46a3ff-0x0;var _0x404bc2=_0x8f97[_0x46a3ff];return _0x404bc2;};'use strict';var _=require('lodash');var util=require(_0x78f9('0x0'));var moment=require(_0x78f9('0x1'));var BPromise=require(_0x78f9('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x78f9('0x3'))['db'];var utils=require(_0x78f9('0x4'));var logger=require(_0x78f9('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x78f9('0x6'));var client=jayson['client'][_0x78f9('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x14317d,_0x2616b5,_0x497724){return new BPromise(function(_0xf9946,_0x526bb){return client[_0x78f9('0x8')](_0x14317d,_0x497724)[_0x78f9('0x9')](function(_0x14e916){logger[_0x78f9('0xa')](_0x78f9('0xb'),_0x2616b5,'request\x20sent');logger[_0x78f9('0xc')](_0x78f9('0xd'),_0x2616b5,_0x78f9('0xe'),JSON[_0x78f9('0xf')](_0x14e916));if(_0x14e916['error']){if(_0x14e916[_0x78f9('0x10')][_0x78f9('0x11')]===0x1f4){logger[_0x78f9('0x10')](_0x78f9('0xb'),_0x2616b5,_0x14e916['error'][_0x78f9('0x12')]);return _0x526bb(_0x14e916[_0x78f9('0x10')][_0x78f9('0x12')]);}logger['error'](_0x78f9('0xb'),_0x2616b5,_0x14e916[_0x78f9('0x10')][_0x78f9('0x12')]);return _0xf9946(_0x14e916['error'][_0x78f9('0x12')]);}else{logger['info'](_0x78f9('0xb'),_0x2616b5,_0x78f9('0xe'));_0xf9946(_0x14e916[_0x78f9('0x13')][_0x78f9('0x12')]);}})[_0x78f9('0x14')](function(_0x4f81ec){logger[_0x78f9('0x10')](_0x78f9('0xb'),_0x2616b5,_0x4f81ec);_0x526bb(_0x4f81ec);});});}exports[_0x78f9('0x15')]=function(_0x209f2f){var _0x7388bd=this;return new Promise(function(_0x534d6c,_0x7f5b7b){return db['Pause'][_0x78f9('0x16')]({'raw':_0x209f2f[_0x78f9('0x17')]?_0x209f2f[_0x78f9('0x17')][_0x78f9('0x18')]===undefined?!![]:![]:!![],'where':_0x209f2f[_0x78f9('0x17')]?_0x209f2f['options'][_0x78f9('0x19')]||null:null,'attributes':_0x209f2f['options']?_0x209f2f[_0x78f9('0x17')][_0x78f9('0x1a')]||null:null,'include':_0x209f2f[_0x78f9('0x17')]?_0x209f2f[_0x78f9('0x17')][_0x78f9('0x1b')]?_['map'](_0x209f2f[_0x78f9('0x17')]['include'],function(_0x3afbe8){return{'model':db[_0x3afbe8['model']],'as':_0x3afbe8['as'],'attributes':_0x3afbe8[_0x78f9('0x1a')],'include':_0x3afbe8[_0x78f9('0x1b')]?_['map'](_0x3afbe8[_0x78f9('0x1b')],function(_0x2426a2){return{'model':db[_0x2426a2[_0x78f9('0x1c')]],'as':_0x2426a2['as'],'attributes':_0x2426a2[_0x78f9('0x1a')],'include':_0x2426a2[_0x78f9('0x1b')]?_[_0x78f9('0x1d')](_0x2426a2[_0x78f9('0x1b')],function(_0x5dd0fc){return{'model':db[_0x5dd0fc[_0x78f9('0x1c')]],'as':_0x5dd0fc['as'],'attributes':_0x5dd0fc[_0x78f9('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x78f9('0x9')](function(_0x332414){logger[_0x78f9('0xa')]('ShowPause',_0x209f2f);logger[_0x78f9('0xc')](_0x78f9('0x15'),_0x209f2f,JSON[_0x78f9('0xf')](_0x332414));_0x534d6c(_0x332414);})[_0x78f9('0x14')](function(_0x1153d5){logger[_0x78f9('0x10')](_0x78f9('0x15'),_0x1153d5[_0x78f9('0x12')],_0x209f2f);_0x7f5b7b(_0x7388bd[_0x78f9('0x10')](0x1f4,_0x1153d5[_0x78f9('0x12')]));});});};
\ No newline at end of file
+var _0xb10b=['catch','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','Pause,\x20%s,\x20%s','Pause,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','ShowPause','Pause','find','options','raw','where','attributes','map','include','model','debug'];(function(_0x537e66,_0x25dd4f){var _0x50a5a6=function(_0x9573bf){while(--_0x9573bf){_0x537e66['push'](_0x537e66['shift']());}};_0x50a5a6(++_0x25dd4f);}(_0xb10b,0x12a));var _0xbb10=function(_0x443b1e,_0xf7ffe9){_0x443b1e=_0x443b1e-0x0;var _0x3beb6f=_0xb10b[_0x443b1e];return _0x3beb6f;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}exports[_0xbb10('0x15')]=function(_0x378da8){var _0x1682a4=this;return new Promise(function(_0x575cca,_0x30efc6){return db[_0xbb10('0x16')][_0xbb10('0x17')]({'raw':_0x378da8['options']?_0x378da8[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![],'where':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x1a')]||null:null,'attributes':_0x378da8[_0xbb10('0x18')]?_0x378da8['options'][_0xbb10('0x1b')]||null:null,'include':_0x378da8[_0xbb10('0x18')]?_0x378da8['options']['include']?_[_0xbb10('0x1c')](_0x378da8[_0xbb10('0x18')][_0xbb10('0x1d')],function(_0x317da4){return{'model':db[_0x317da4[_0xbb10('0x1e')]],'as':_0x317da4['as'],'attributes':_0x317da4[_0xbb10('0x1b')],'include':_0x317da4[_0xbb10('0x1d')]?_[_0xbb10('0x1c')](_0x317da4[_0xbb10('0x1d')],function(_0x395404){return{'model':db[_0x395404[_0xbb10('0x1e')]],'as':_0x395404['as'],'attributes':_0x395404[_0xbb10('0x1b')],'include':_0x395404['include']?_['map'](_0x395404['include'],function(_0xc93a04){return{'model':db[_0xc93a04[_0xbb10('0x1e')]],'as':_0xc93a04['as'],'attributes':_0xc93a04[_0xbb10('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2fdde9){logger[_0xbb10('0xd')](_0xbb10('0x15'),_0x378da8);logger[_0xbb10('0x1f')](_0xbb10('0x15'),_0x378da8,JSON[_0xbb10('0x11')](_0x2fdde9));_0x575cca(_0x2fdde9);})[_0xbb10('0x20')](function(_0x4aabb9){logger[_0xbb10('0x12')](_0xbb10('0x15'),_0x4aabb9[_0xbb10('0x13')],_0x378da8);_0x30efc6(_0x1682a4[_0xbb10('0x12')](0x1f4,_0x4aabb9[_0xbb10('0x13')]));});});};
\ No newline at end of file