Built motion from commit (unavailable).|2.5.30
[motion2.git] / server / api / cmHopperBlack / cmHopperBlack.rpc.js
index 78c110f..2468c10 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc43a=['util','moment','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','GetCmHopperBlack','CmHopperBlack','findAll','options','raw','where','attributes','limit','map','include','model','update','then','UpdateCmHopperBlack','DestroyCmHopperBlack','destroy','lodash'];(function(_0x19c2e1,_0x50216f){var _0x10bd64=function(_0x58ab2b){while(--_0x58ab2b){_0x19c2e1['push'](_0x19c2e1['shift']());}};_0x10bd64(++_0x50216f);}(_0xc43a,0xd1));var _0xac43=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc43a[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xac43('0x0'));var util=require(_0xac43('0x1'));var moment=require(_0xac43('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xac43('0x3'));var db=require(_0xac43('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xac43('0x5'))(_0xac43('0x6'));var config=require('../../config/environment');var jayson=require(_0xac43('0x7'));var client=jayson[_0xac43('0x8')][_0xac43('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2f95bf,_0x526843,_0x39abbc){return new BPromise(function(_0x38074c,_0x4d939e){return client['request'](_0x2f95bf,_0x39abbc)['then'](function(_0x1b6aa5){logger[_0xac43('0xa')](_0xac43('0xb'),_0x526843,_0xac43('0xc'));logger[_0xac43('0xd')]('CmHopperBlack,\x20%s,\x20%s,\x20%s',_0x526843,_0xac43('0xc'),JSON[_0xac43('0xe')](_0x1b6aa5));if(_0x1b6aa5[_0xac43('0xf')]){if(_0x1b6aa5[_0xac43('0xf')]['code']===0x1f4){logger[_0xac43('0xf')](_0xac43('0xb'),_0x526843,_0x1b6aa5[_0xac43('0xf')][_0xac43('0x10')]);return _0x4d939e(_0x1b6aa5['error'][_0xac43('0x10')]);}logger[_0xac43('0xf')](_0xac43('0xb'),_0x526843,_0x1b6aa5['error'][_0xac43('0x10')]);return _0x38074c(_0x1b6aa5[_0xac43('0xf')]['message']);}else{logger[_0xac43('0xa')](_0xac43('0xb'),_0x526843,'request\x20sent');_0x38074c(_0x1b6aa5[_0xac43('0x11')][_0xac43('0x10')]);}})[_0xac43('0x12')](function(_0x47836c){logger[_0xac43('0xf')](_0xac43('0xb'),_0x526843,_0x47836c);_0x4d939e(_0x47836c);});});}exports[_0xac43('0x13')]=function(_0x135b61){var _0x1bef33=this;return new Promise(function(_0x267793,_0xd1b915){return db[_0xac43('0x14')][_0xac43('0x15')]({'raw':_0x135b61[_0xac43('0x16')]?_0x135b61[_0xac43('0x16')][_0xac43('0x17')]===undefined?!![]:![]:!![],'where':_0x135b61[_0xac43('0x16')]?_0x135b61[_0xac43('0x16')][_0xac43('0x18')]||null:null,'attributes':_0x135b61[_0xac43('0x16')]?_0x135b61[_0xac43('0x16')][_0xac43('0x19')]||null:null,'limit':_0x135b61['options']?_0x135b61['options'][_0xac43('0x1a')]||null:null,'include':_0x135b61[_0xac43('0x16')]?_0x135b61['options']['include']?_[_0xac43('0x1b')](_0x135b61[_0xac43('0x16')][_0xac43('0x1c')],function(_0x3df6ce){return{'model':db[_0x3df6ce[_0xac43('0x1d')]],'as':_0x3df6ce['as'],'attributes':_0x3df6ce['attributes'],'include':_0x3df6ce[_0xac43('0x1c')]?_[_0xac43('0x1b')](_0x3df6ce[_0xac43('0x1c')],function(_0x1e4a00){return{'model':db[_0x1e4a00['model']],'as':_0x1e4a00['as'],'attributes':_0x1e4a00[_0xac43('0x19')],'include':_0x1e4a00[_0xac43('0x1c')]?_[_0xac43('0x1b')](_0x1e4a00[_0xac43('0x1c')],function(_0x32d465){return{'model':db[_0x32d465[_0xac43('0x1d')]],'as':_0x32d465['as'],'attributes':_0x32d465[_0xac43('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x445b7d){logger['info'](_0xac43('0x13'),_0x135b61);logger[_0xac43('0xd')](_0xac43('0x13'),_0x135b61,JSON[_0xac43('0xe')](_0x445b7d));_0x267793(_0x445b7d);})[_0xac43('0x12')](function(_0x288fb2){logger[_0xac43('0xf')](_0xac43('0x13'),_0x288fb2[_0xac43('0x10')],_0x135b61);_0xd1b915(_0x1bef33[_0xac43('0xf')](0x1f4,_0x288fb2[_0xac43('0x10')]));});});};exports['UpdateCmHopperBlack']=function(_0x57b0de){var _0x2e8f7b=this;return new Promise(function(_0x1bb0b6,_0x4955b2){return db[_0xac43('0x14')][_0xac43('0x1e')](_0x57b0de['body'],{'raw':_0x57b0de['options']?_0x57b0de[_0xac43('0x16')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x57b0de['options']?_0x57b0de['options'][_0xac43('0x18')]||null:null,'attributes':_0x57b0de[_0xac43('0x16')]?_0x57b0de[_0xac43('0x16')][_0xac43('0x19')]||null:null,'limit':_0x57b0de[_0xac43('0x16')]?_0x57b0de[_0xac43('0x16')][_0xac43('0x1a')]||null:null})[_0xac43('0x1f')](function(_0x3e78da){logger[_0xac43('0xa')](_0xac43('0x20'),_0x57b0de);logger[_0xac43('0xd')](_0xac43('0x20'),_0x57b0de,JSON[_0xac43('0xe')](_0x3e78da));_0x1bb0b6(_0x3e78da);})[_0xac43('0x12')](function(_0x527248){logger[_0xac43('0xf')](_0xac43('0x20'),_0x527248[_0xac43('0x10')],_0x57b0de);_0x4955b2(_0x2e8f7b[_0xac43('0xf')](0x1f4,_0x527248[_0xac43('0x10')]));});});};exports[_0xac43('0x21')]=function(_0x4633f0){var _0x168b62=this;return new Promise(function(_0x1318cb,_0x47297a){return db['CmHopperBlack'][_0xac43('0x22')]({'where':_0x4633f0[_0xac43('0x16')]?_0x4633f0[_0xac43('0x16')][_0xac43('0x18')]||null:null})[_0xac43('0x1f')](function(_0x20e165){logger['info'](_0xac43('0x21'),_0x4633f0);logger[_0xac43('0xd')](_0xac43('0x21'),_0x4633f0,JSON[_0xac43('0xe')](_0x20e165));_0x1318cb(_0x20e165);})[_0xac43('0x12')](function(_0x32c5da){logger[_0xac43('0xf')]('DestroyCmHopperBlack',_0x32c5da[_0xac43('0x10')],_0x4633f0);_0x47297a(_0x168b62[_0xac43('0xf')](0x1f4,_0x32c5da[_0xac43('0x10')]));});});};
\ No newline at end of file
+var _0x096f=['debug','stringify','catch','UpdateCmHopperBlack','update','body','DestroyCmHopperBlack','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','CmHopperBlack,\x20%s,\x20%s','CmHopperBlack,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','GetCmHopperBlack','CmHopperBlack','findAll','options','raw','where','attributes','limit','include','map','model'];(function(_0x1559a5,_0x41924e){var _0x17a783=function(_0x152c63){while(--_0x152c63){_0x1559a5['push'](_0x1559a5['shift']());}};_0x17a783(++_0x41924e);}(_0x096f,0x18d));var _0xf096=function(_0x593bfc,_0xce7cf0){_0x593bfc=_0x593bfc-0x0;var _0x292f31=_0x096f[_0x593bfc];return _0x292f31;};'use strict';var _=require(_0xf096('0x0'));var util=require('util');var moment=require(_0xf096('0x1'));var BPromise=require(_0xf096('0x2'));var rs=require(_0xf096('0x3'));var fs=require('fs');var Redis=require(_0xf096('0x4'));var db=require(_0xf096('0x5'))['db'];var utils=require(_0xf096('0x6'));var logger=require(_0xf096('0x7'))('rpc');var config=require(_0xf096('0x8'));var jayson=require(_0xf096('0x9'));var client=jayson[_0xf096('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x59b95f,_0x169e51,_0x286a20){return new BPromise(function(_0x3c969f,_0x395e80){return client[_0xf096('0xb')](_0x59b95f,_0x286a20)[_0xf096('0xc')](function(_0x3f55f2){logger[_0xf096('0xd')](_0xf096('0xe'),_0x169e51,'request\x20sent');logger['debug'](_0xf096('0xf'),_0x169e51,_0xf096('0x10'),JSON['stringify'](_0x3f55f2));if(_0x3f55f2['error']){if(_0x3f55f2[_0xf096('0x11')][_0xf096('0x12')]===0x1f4){logger['error'](_0xf096('0xe'),_0x169e51,_0x3f55f2[_0xf096('0x11')][_0xf096('0x13')]);return _0x395e80(_0x3f55f2['error'][_0xf096('0x13')]);}logger[_0xf096('0x11')](_0xf096('0xe'),_0x169e51,_0x3f55f2['error'][_0xf096('0x13')]);return _0x3c969f(_0x3f55f2['error'][_0xf096('0x13')]);}else{logger[_0xf096('0xd')](_0xf096('0xe'),_0x169e51,_0xf096('0x10'));_0x3c969f(_0x3f55f2[_0xf096('0x14')]['message']);}})['catch'](function(_0x196832){logger[_0xf096('0x11')](_0xf096('0xe'),_0x169e51,_0x196832);_0x395e80(_0x196832);});});}exports[_0xf096('0x15')]=function(_0xb35272){var _0x3da266=this;return new Promise(function(_0x11d928,_0x37dca1){return db[_0xf096('0x16')][_0xf096('0x17')]({'raw':_0xb35272[_0xf096('0x18')]?_0xb35272['options'][_0xf096('0x19')]===undefined?!![]:![]:!![],'where':_0xb35272[_0xf096('0x18')]?_0xb35272['options'][_0xf096('0x1a')]||null:null,'attributes':_0xb35272[_0xf096('0x18')]?_0xb35272[_0xf096('0x18')][_0xf096('0x1b')]||null:null,'limit':_0xb35272[_0xf096('0x18')]?_0xb35272[_0xf096('0x18')][_0xf096('0x1c')]||null:null,'include':_0xb35272['options']?_0xb35272[_0xf096('0x18')][_0xf096('0x1d')]?_[_0xf096('0x1e')](_0xb35272['options'][_0xf096('0x1d')],function(_0xaf95a8){return{'model':db[_0xaf95a8[_0xf096('0x1f')]],'as':_0xaf95a8['as'],'attributes':_0xaf95a8['attributes'],'include':_0xaf95a8['include']?_[_0xf096('0x1e')](_0xaf95a8[_0xf096('0x1d')],function(_0x3e2b31){return{'model':db[_0x3e2b31[_0xf096('0x1f')]],'as':_0x3e2b31['as'],'attributes':_0x3e2b31[_0xf096('0x1b')],'include':_0x3e2b31[_0xf096('0x1d')]?_['map'](_0x3e2b31[_0xf096('0x1d')],function(_0x585ada){return{'model':db[_0x585ada[_0xf096('0x1f')]],'as':_0x585ada['as'],'attributes':_0x585ada[_0xf096('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xf096('0xc')](function(_0x2d39c8){logger[_0xf096('0xd')](_0xf096('0x15'),_0xb35272);logger[_0xf096('0x20')]('GetCmHopperBlack',_0xb35272,JSON[_0xf096('0x21')](_0x2d39c8));_0x11d928(_0x2d39c8);})[_0xf096('0x22')](function(_0x25a1de){logger[_0xf096('0x11')]('GetCmHopperBlack',_0x25a1de[_0xf096('0x13')],_0xb35272);_0x37dca1(_0x3da266[_0xf096('0x11')](0x1f4,_0x25a1de[_0xf096('0x13')]));});});};exports[_0xf096('0x23')]=function(_0x191ec7){var _0x4a18e1=this;return new Promise(function(_0x50d73d,_0x277293){return db[_0xf096('0x16')][_0xf096('0x24')](_0x191ec7[_0xf096('0x25')],{'raw':_0x191ec7[_0xf096('0x18')]?_0x191ec7[_0xf096('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x191ec7[_0xf096('0x18')]?_0x191ec7[_0xf096('0x18')][_0xf096('0x1a')]||null:null,'attributes':_0x191ec7[_0xf096('0x18')]?_0x191ec7[_0xf096('0x18')][_0xf096('0x1b')]||null:null,'limit':_0x191ec7[_0xf096('0x18')]?_0x191ec7[_0xf096('0x18')][_0xf096('0x1c')]||null:null})[_0xf096('0xc')](function(_0x17720f){logger[_0xf096('0xd')](_0xf096('0x23'),_0x191ec7);logger[_0xf096('0x20')](_0xf096('0x23'),_0x191ec7,JSON[_0xf096('0x21')](_0x17720f));_0x50d73d(_0x17720f);})[_0xf096('0x22')](function(_0x4ebbd8){logger[_0xf096('0x11')](_0xf096('0x23'),_0x4ebbd8['message'],_0x191ec7);_0x277293(_0x4a18e1[_0xf096('0x11')](0x1f4,_0x4ebbd8[_0xf096('0x13')]));});});};exports['DestroyCmHopperBlack']=function(_0x5f2cc1){var _0x24c9b5=this;return new Promise(function(_0x4f3096,_0xdb5129){return db[_0xf096('0x16')]['destroy']({'where':_0x5f2cc1[_0xf096('0x18')]?_0x5f2cc1['options']['where']||null:null})[_0xf096('0xc')](function(_0x40a0b5){logger['info'](_0xf096('0x26'),_0x5f2cc1);logger[_0xf096('0x20')](_0xf096('0x26'),_0x5f2cc1,JSON[_0xf096('0x21')](_0x40a0b5));_0x4f3096(_0x40a0b5);})['catch'](function(_0x486c4b){logger[_0xf096('0x11')]('DestroyCmHopperBlack',_0x486c4b['message'],_0x5f2cc1);_0xdb5129(_0x24c9b5[_0xf096('0x11')](0x1f4,_0x486c4b['message']));});});};
\ No newline at end of file