Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / server / api / pause / pause.rpc.js
index ff12a5e..0b88db1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd200=['map','attributes','model','stringify','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','info','request\x20sent','debug','error','Pause,\x20%s,\x20%s','message','ShowPause','Pause','find','options','where','include'];(function(_0x10df1e,_0xf56f85){var _0x3e24fb=function(_0x5cdb59){while(--_0x5cdb59){_0x10df1e['push'](_0x10df1e['shift']());}};_0x3e24fb(++_0xf56f85);}(_0xd200,0x1d4));var _0x0d20=function(_0x5e36d1,_0x471178){_0x5e36d1=_0x5e36d1-0x0;var _0x950b9e=_0xd200[_0x5e36d1];return _0x950b9e;};'use strict';var _=require('lodash');var util=require(_0x0d20('0x0'));var moment=require(_0x0d20('0x1'));var BPromise=require(_0x0d20('0x2'));var rs=require(_0x0d20('0x3'));var fs=require('fs');var Redis=require(_0x0d20('0x4'));var db=require(_0x0d20('0x5'))['db'];var utils=require(_0x0d20('0x6'));var logger=require(_0x0d20('0x7'))('rpc');var config=require(_0x0d20('0x8'));var jayson=require(_0x0d20('0x9'));var client=jayson['client'][_0x0d20('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5417d2,_0xea6bd1,_0x423704){return new BPromise(function(_0x3d4521,_0x3a112a){return client[_0x0d20('0xb')](_0x5417d2,_0x423704)[_0x0d20('0xc')](function(_0x137dd5){logger[_0x0d20('0xd')]('Pause,\x20%s,\x20%s',_0xea6bd1,_0x0d20('0xe'));logger[_0x0d20('0xf')]('Pause,\x20%s,\x20%s,\x20%s',_0xea6bd1,_0x0d20('0xe'),JSON['stringify'](_0x137dd5));if(_0x137dd5[_0x0d20('0x10')]){if(_0x137dd5[_0x0d20('0x10')]['code']===0x1f4){logger[_0x0d20('0x10')](_0x0d20('0x11'),_0xea6bd1,_0x137dd5[_0x0d20('0x10')][_0x0d20('0x12')]);return _0x3a112a(_0x137dd5['error'][_0x0d20('0x12')]);}logger[_0x0d20('0x10')]('Pause,\x20%s,\x20%s',_0xea6bd1,_0x137dd5[_0x0d20('0x10')][_0x0d20('0x12')]);return _0x3d4521(_0x137dd5[_0x0d20('0x10')][_0x0d20('0x12')]);}else{logger[_0x0d20('0xd')](_0x0d20('0x11'),_0xea6bd1,_0x0d20('0xe'));_0x3d4521(_0x137dd5['result'][_0x0d20('0x12')]);}})['catch'](function(_0x6c4b28){logger['error'](_0x0d20('0x11'),_0xea6bd1,_0x6c4b28);_0x3a112a(_0x6c4b28);});});}exports[_0x0d20('0x13')]=function(_0x251701){var _0x4da9ba=this;return new Promise(function(_0x1a71cd,_0x2f5f80){return db[_0x0d20('0x14')][_0x0d20('0x15')]({'raw':_0x251701[_0x0d20('0x16')]?_0x251701['options']['raw']===undefined?!![]:![]:!![],'where':_0x251701[_0x0d20('0x16')]?_0x251701[_0x0d20('0x16')][_0x0d20('0x17')]||null:null,'attributes':_0x251701[_0x0d20('0x16')]?_0x251701[_0x0d20('0x16')]['attributes']||null:null,'include':_0x251701[_0x0d20('0x16')]?_0x251701[_0x0d20('0x16')][_0x0d20('0x18')]?_[_0x0d20('0x19')](_0x251701[_0x0d20('0x16')]['include'],function(_0x10d3e4){return{'model':db[_0x10d3e4['model']],'as':_0x10d3e4['as'],'attributes':_0x10d3e4[_0x0d20('0x1a')],'include':_0x10d3e4[_0x0d20('0x18')]?_[_0x0d20('0x19')](_0x10d3e4['include'],function(_0x19f1af){return{'model':db[_0x19f1af[_0x0d20('0x1b')]],'as':_0x19f1af['as'],'attributes':_0x19f1af[_0x0d20('0x1a')],'include':_0x19f1af[_0x0d20('0x18')]?_[_0x0d20('0x19')](_0x19f1af[_0x0d20('0x18')],function(_0x209072){return{'model':db[_0x209072['model']],'as':_0x209072['as'],'attributes':_0x209072['attributes']};}):[]};}):[]};}):[]:[]})[_0x0d20('0xc')](function(_0x38f370){logger[_0x0d20('0xd')]('ShowPause',_0x251701);logger[_0x0d20('0xf')](_0x0d20('0x13'),_0x251701,JSON[_0x0d20('0x1c')](_0x38f370));_0x1a71cd(_0x38f370);})['catch'](function(_0x1ab190){logger['error']('ShowPause',_0x1ab190[_0x0d20('0x12')],_0x251701);_0x2f5f80(_0x4da9ba[_0x0d20('0x10')](0x1f4,_0x1ab190[_0x0d20('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(_0x5a93e2,_0x1045d5){var _0xe1dc44=function(_0x114b56){while(--_0x114b56){_0x5a93e2['push'](_0x5a93e2['shift']());}};_0xe1dc44(++_0x1045d5);}(_0xb10b,0x12a));var _0xbb10=function(_0x32f2b5,_0x3e7573){_0x32f2b5=_0x32f2b5-0x0;var _0x4acddb=_0xb10b[_0x32f2b5];return _0x4acddb;};'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