Built motion from commit (unavailable).|2.5.13
[motion2.git] / server / api / cmCompany / cmCompany.rpc.js
index 57e95b7..61d79c4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x90a1=['error','message','result','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','jayson/promise','http','then','info','CmCompany,\x20%s,\x20%s','request\x20sent','debug','CmCompany,\x20%s,\x20%s,\x20%s','stringify','code'];(function(_0x4bf96c,_0x4d24fd){var _0x281d09=function(_0x56538e){while(--_0x56538e){_0x4bf96c['push'](_0x4bf96c['shift']());}};_0x281d09(++_0x4d24fd);}(_0x90a1,0x143));var _0x190a=function(_0x11c573,_0x9e7c6e){_0x11c573=_0x11c573-0x0;var _0x6b72de=_0x90a1[_0x11c573];return _0x6b72de;};'use strict';var _=require('lodash');var util=require(_0x190a('0x0'));var moment=require(_0x190a('0x1'));var BPromise=require(_0x190a('0x2'));var rs=require(_0x190a('0x3'));var fs=require('fs');var Redis=require(_0x190a('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x190a('0x5'));var logger=require(_0x190a('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x190a('0x7'));var client=jayson['client'][_0x190a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1015bd,_0x2d24a5,_0x527e80){return new BPromise(function(_0x63f3c,_0x4e4fae){return client['request'](_0x1015bd,_0x527e80)[_0x190a('0x9')](function(_0x3c86cd){logger[_0x190a('0xa')](_0x190a('0xb'),_0x2d24a5,_0x190a('0xc'));logger[_0x190a('0xd')](_0x190a('0xe'),_0x2d24a5,'request\x20sent',JSON[_0x190a('0xf')](_0x3c86cd));if(_0x3c86cd['error']){if(_0x3c86cd['error'][_0x190a('0x10')]===0x1f4){logger[_0x190a('0x11')](_0x190a('0xb'),_0x2d24a5,_0x3c86cd[_0x190a('0x11')][_0x190a('0x12')]);return _0x4e4fae(_0x3c86cd[_0x190a('0x11')]['message']);}logger['error'](_0x190a('0xb'),_0x2d24a5,_0x3c86cd['error']['message']);return _0x63f3c(_0x3c86cd[_0x190a('0x11')][_0x190a('0x12')]);}else{logger[_0x190a('0xa')]('CmCompany,\x20%s,\x20%s',_0x2d24a5,'request\x20sent');_0x63f3c(_0x3c86cd[_0x190a('0x13')][_0x190a('0x12')]);}})['catch'](function(_0x2407c0){logger[_0x190a('0x11')]('CmCompany,\x20%s,\x20%s',_0x2d24a5,_0x2407c0);_0x4e4fae(_0x2407c0);});});}
\ No newline at end of file
+var _0x377f=['error','code','message','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','http','request','then','info','CmCompany,\x20%s,\x20%s','debug'];(function(_0x30d639,_0x2294b4){var _0x5efb0a=function(_0xcd330b){while(--_0xcd330b){_0x30d639['push'](_0x30d639['shift']());}};_0x5efb0a(++_0x2294b4);}(_0x377f,0x8a));var _0xf377=function(_0x1be3b9,_0x46c1dd){_0x1be3b9=_0x1be3b9-0x0;var _0x4c5e51=_0x377f[_0x1be3b9];return _0x4c5e51;};'use strict';var _=require(_0xf377('0x0'));var util=require(_0xf377('0x1'));var moment=require(_0xf377('0x2'));var BPromise=require('bluebird');var rs=require(_0xf377('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf377('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xf377('0x5'))('rpc');var config=require(_0xf377('0x6'));var jayson=require(_0xf377('0x7'));var client=jayson['client'][_0xf377('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x263ec5,_0x30b62e,_0x4e9498){return new BPromise(function(_0x2fd360,_0x4a1209){return client[_0xf377('0x9')](_0x263ec5,_0x4e9498)[_0xf377('0xa')](function(_0x1484fa){logger[_0xf377('0xb')](_0xf377('0xc'),_0x30b62e,'request\x20sent');logger[_0xf377('0xd')]('CmCompany,\x20%s,\x20%s,\x20%s',_0x30b62e,'request\x20sent',JSON['stringify'](_0x1484fa));if(_0x1484fa[_0xf377('0xe')]){if(_0x1484fa['error'][_0xf377('0xf')]===0x1f4){logger[_0xf377('0xe')](_0xf377('0xc'),_0x30b62e,_0x1484fa[_0xf377('0xe')][_0xf377('0x10')]);return _0x4a1209(_0x1484fa[_0xf377('0xe')][_0xf377('0x10')]);}logger['error']('CmCompany,\x20%s,\x20%s',_0x30b62e,_0x1484fa[_0xf377('0xe')][_0xf377('0x10')]);return _0x2fd360(_0x1484fa['error'][_0xf377('0x10')]);}else{logger[_0xf377('0xb')](_0xf377('0xc'),_0x30b62e,'request\x20sent');_0x2fd360(_0x1484fa[_0xf377('0x11')][_0xf377('0x10')]);}})[_0xf377('0x12')](function(_0x2308c6){logger['error']('CmCompany,\x20%s,\x20%s',_0x30b62e,_0x2308c6);_0x4a1209(_0x2308c6);});});}
\ No newline at end of file