Built motion from commit (unavailable).|2.5.27
[motion2.git] / server / api / pause / pause.rpc.js
index 39ef7c9..1748a16 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaff1=['include','map','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','Pause,\x20%s,\x20%s','request\x20sent','debug','Pause,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','ShowPause','Pause','find','options','where','attributes','model'];(function(_0x22ffed,_0x1b287a){var _0x2a5e78=function(_0x37059c){while(--_0x37059c){_0x22ffed['push'](_0x22ffed['shift']());}};_0x2a5e78(++_0x1b287a);}(_0xaff1,0x1d3));var _0x1aff=function(_0xfd9051,_0x3371fe){_0xfd9051=_0xfd9051-0x0;var _0x2cac2e=_0xaff1[_0xfd9051];return _0x2cac2e;};'use strict';var _=require('lodash');var util=require(_0x1aff('0x0'));var moment=require('moment');var BPromise=require(_0x1aff('0x1'));var rs=require(_0x1aff('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1aff('0x3'))['db'];var utils=require(_0x1aff('0x4'));var logger=require(_0x1aff('0x5'))(_0x1aff('0x6'));var config=require(_0x1aff('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x1aff('0x8')][_0x1aff('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x16574d,_0x4d587b,_0x24cd78){return new BPromise(function(_0xc186af,_0x458e33){return client[_0x1aff('0xa')](_0x16574d,_0x24cd78)[_0x1aff('0xb')](function(_0x15792d){logger[_0x1aff('0xc')](_0x1aff('0xd'),_0x4d587b,_0x1aff('0xe'));logger[_0x1aff('0xf')](_0x1aff('0x10'),_0x4d587b,'request\x20sent',JSON[_0x1aff('0x11')](_0x15792d));if(_0x15792d['error']){if(_0x15792d[_0x1aff('0x12')]['code']===0x1f4){logger[_0x1aff('0x12')](_0x1aff('0xd'),_0x4d587b,_0x15792d[_0x1aff('0x12')][_0x1aff('0x13')]);return _0x458e33(_0x15792d[_0x1aff('0x12')][_0x1aff('0x13')]);}logger[_0x1aff('0x12')](_0x1aff('0xd'),_0x4d587b,_0x15792d[_0x1aff('0x12')][_0x1aff('0x13')]);return _0xc186af(_0x15792d[_0x1aff('0x12')]['message']);}else{logger[_0x1aff('0xc')](_0x1aff('0xd'),_0x4d587b,_0x1aff('0xe'));_0xc186af(_0x15792d[_0x1aff('0x14')][_0x1aff('0x13')]);}})[_0x1aff('0x15')](function(_0x3f03e3){logger[_0x1aff('0x12')](_0x1aff('0xd'),_0x4d587b,_0x3f03e3);_0x458e33(_0x3f03e3);});});}exports[_0x1aff('0x16')]=function(_0x38e33a){var _0x3469fb=this;return new Promise(function(_0x2eee6f,_0x185e6f){return db[_0x1aff('0x17')][_0x1aff('0x18')]({'raw':_0x38e33a[_0x1aff('0x19')]?_0x38e33a['options']['raw']===undefined?!![]:![]:!![],'where':_0x38e33a[_0x1aff('0x19')]?_0x38e33a[_0x1aff('0x19')][_0x1aff('0x1a')]||null:null,'attributes':_0x38e33a['options']?_0x38e33a[_0x1aff('0x19')][_0x1aff('0x1b')]||null:null,'include':_0x38e33a[_0x1aff('0x19')]?_0x38e33a[_0x1aff('0x19')]['include']?_['map'](_0x38e33a[_0x1aff('0x19')]['include'],function(_0x57d6d6){return{'model':db[_0x57d6d6[_0x1aff('0x1c')]],'as':_0x57d6d6['as'],'attributes':_0x57d6d6[_0x1aff('0x1b')],'include':_0x57d6d6['include']?_['map'](_0x57d6d6[_0x1aff('0x1d')],function(_0x5dbe98){return{'model':db[_0x5dbe98[_0x1aff('0x1c')]],'as':_0x5dbe98['as'],'attributes':_0x5dbe98[_0x1aff('0x1b')],'include':_0x5dbe98[_0x1aff('0x1d')]?_[_0x1aff('0x1e')](_0x5dbe98[_0x1aff('0x1d')],function(_0xe3df1e){return{'model':db[_0xe3df1e['model']],'as':_0xe3df1e['as'],'attributes':_0xe3df1e['attributes']};}):[]};}):[]};}):[]:[]})[_0x1aff('0xb')](function(_0x119f11){logger['info'](_0x1aff('0x16'),_0x38e33a);logger['debug'](_0x1aff('0x16'),_0x38e33a,JSON['stringify'](_0x119f11));_0x2eee6f(_0x119f11);})[_0x1aff('0x15')](function(_0xa2a2e8){logger[_0x1aff('0x12')](_0x1aff('0x16'),_0xa2a2e8[_0x1aff('0x13')],_0x38e33a);_0x185e6f(_0x3469fb[_0x1aff('0x12')](0x1f4,_0xa2a2e8[_0x1aff('0x13')]));});});};
\ No newline at end of file
+var _0x1cde=['map','debug','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','then','info','Pause,\x20%s,\x20%s','request\x20sent','Pause,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','ShowPause','Pause','find','options','raw','where','include','model','attributes'];(function(_0x39f9ac,_0xc811cd){var _0x1efcf4=function(_0x18dca5){while(--_0x18dca5){_0x39f9ac['push'](_0x39f9ac['shift']());}};_0x1efcf4(++_0xc811cd);}(_0x1cde,0x1f1));var _0xe1cd=function(_0x1d5908,_0x2722ce){_0x1d5908=_0x1d5908-0x0;var _0x150347=_0x1cde[_0x1d5908];return _0x150347;};'use strict';var _=require('lodash');var util=require(_0xe1cd('0x0'));var moment=require(_0xe1cd('0x1'));var BPromise=require(_0xe1cd('0x2'));var rs=require(_0xe1cd('0x3'));var fs=require('fs');var Redis=require(_0xe1cd('0x4'));var db=require(_0xe1cd('0x5'))['db'];var utils=require(_0xe1cd('0x6'));var logger=require('../../config/logger')(_0xe1cd('0x7'));var config=require(_0xe1cd('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xe1cd('0x9')][_0xe1cd('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x43439f,_0xc332c9,_0x41149e){return new BPromise(function(_0x1b95dd,_0x36127b){return client[_0xe1cd('0xb')](_0x43439f,_0x41149e)[_0xe1cd('0xc')](function(_0x4fc930){logger[_0xe1cd('0xd')](_0xe1cd('0xe'),_0xc332c9,_0xe1cd('0xf'));logger['debug'](_0xe1cd('0x10'),_0xc332c9,'request\x20sent',JSON[_0xe1cd('0x11')](_0x4fc930));if(_0x4fc930[_0xe1cd('0x12')]){if(_0x4fc930[_0xe1cd('0x12')]['code']===0x1f4){logger[_0xe1cd('0x12')](_0xe1cd('0xe'),_0xc332c9,_0x4fc930[_0xe1cd('0x12')][_0xe1cd('0x13')]);return _0x36127b(_0x4fc930['error'][_0xe1cd('0x13')]);}logger[_0xe1cd('0x12')](_0xe1cd('0xe'),_0xc332c9,_0x4fc930[_0xe1cd('0x12')][_0xe1cd('0x13')]);return _0x1b95dd(_0x4fc930[_0xe1cd('0x12')]['message']);}else{logger[_0xe1cd('0xd')]('Pause,\x20%s,\x20%s',_0xc332c9,_0xe1cd('0xf'));_0x1b95dd(_0x4fc930[_0xe1cd('0x14')][_0xe1cd('0x13')]);}})[_0xe1cd('0x15')](function(_0x536509){logger[_0xe1cd('0x12')](_0xe1cd('0xe'),_0xc332c9,_0x536509);_0x36127b(_0x536509);});});}exports[_0xe1cd('0x16')]=function(_0x278b6b){var _0x4bfc3f=this;return new Promise(function(_0x4c55ec,_0x2c9998){return db[_0xe1cd('0x17')][_0xe1cd('0x18')]({'raw':_0x278b6b[_0xe1cd('0x19')]?_0x278b6b['options'][_0xe1cd('0x1a')]===undefined?!![]:![]:!![],'where':_0x278b6b[_0xe1cd('0x19')]?_0x278b6b[_0xe1cd('0x19')][_0xe1cd('0x1b')]||null:null,'attributes':_0x278b6b[_0xe1cd('0x19')]?_0x278b6b[_0xe1cd('0x19')]['attributes']||null:null,'include':_0x278b6b[_0xe1cd('0x19')]?_0x278b6b[_0xe1cd('0x19')]['include']?_['map'](_0x278b6b[_0xe1cd('0x19')][_0xe1cd('0x1c')],function(_0x576308){return{'model':db[_0x576308[_0xe1cd('0x1d')]],'as':_0x576308['as'],'attributes':_0x576308['attributes'],'include':_0x576308[_0xe1cd('0x1c')]?_['map'](_0x576308['include'],function(_0x333877){return{'model':db[_0x333877['model']],'as':_0x333877['as'],'attributes':_0x333877[_0xe1cd('0x1e')],'include':_0x333877[_0xe1cd('0x1c')]?_[_0xe1cd('0x1f')](_0x333877[_0xe1cd('0x1c')],function(_0x4ad3d5){return{'model':db[_0x4ad3d5[_0xe1cd('0x1d')]],'as':_0x4ad3d5['as'],'attributes':_0x4ad3d5[_0xe1cd('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xe1cd('0xc')](function(_0x48b43f){logger[_0xe1cd('0xd')](_0xe1cd('0x16'),_0x278b6b);logger[_0xe1cd('0x20')](_0xe1cd('0x16'),_0x278b6b,JSON['stringify'](_0x48b43f));_0x4c55ec(_0x48b43f);})['catch'](function(_0xaf0fb){logger[_0xe1cd('0x12')](_0xe1cd('0x16'),_0xaf0fb['message'],_0x278b6b);_0x2c9998(_0x4bfc3f['error'](0x1f4,_0xaf0fb[_0xe1cd('0x13')]));});});};
\ No newline at end of file