Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / intFreshsalesConfiguration / intFreshsalesConfiguration.rpc.js
index 96a50cc..9f904b9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3a48=['lodash','moment','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch'];(function(_0x5a33ce,_0x20de18){var _0x2828d0=function(_0x595454){while(--_0x595454){_0x5a33ce['push'](_0x5a33ce['shift']());}};_0x2828d0(++_0x20de18);}(_0x3a48,0x64));var _0x83a4=function(_0x3ad20d,_0x3cadba){_0x3ad20d=_0x3ad20d-0x0;var _0x7c47d9=_0x3a48[_0x3ad20d];return _0x7c47d9;};'use strict';var _=require(_0x83a4('0x0'));var util=require('util');var moment=require(_0x83a4('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x83a4('0x2'))['db'];var utils=require(_0x83a4('0x3'));var logger=require(_0x83a4('0x4'))('rpc');var config=require('../../config/environment');var jayson=require(_0x83a4('0x5'));var client=jayson[_0x83a4('0x6')][_0x83a4('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x11d408,_0x3adcff,_0x25339d){return new BPromise(function(_0x273008,_0x484363){return client[_0x83a4('0x8')](_0x11d408,_0x25339d)[_0x83a4('0x9')](function(_0x350645){logger[_0x83a4('0xa')](_0x83a4('0xb'),_0x3adcff,_0x83a4('0xc'));logger[_0x83a4('0xd')]('FreshsalesConfiguration,\x20%s,\x20%s,\x20%s',_0x3adcff,_0x83a4('0xc'),JSON[_0x83a4('0xe')](_0x350645));if(_0x350645[_0x83a4('0xf')]){if(_0x350645[_0x83a4('0xf')][_0x83a4('0x10')]===0x1f4){logger[_0x83a4('0xf')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x3adcff,_0x350645['error']['message']);return _0x484363(_0x350645[_0x83a4('0xf')][_0x83a4('0x11')]);}logger[_0x83a4('0xf')](_0x83a4('0xb'),_0x3adcff,_0x350645[_0x83a4('0xf')]['message']);return _0x273008(_0x350645['error'][_0x83a4('0x11')]);}else{logger[_0x83a4('0xa')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x3adcff,_0x83a4('0xc'));_0x273008(_0x350645[_0x83a4('0x12')][_0x83a4('0x11')]);}})[_0x83a4('0x13')](function(_0x49ab91){logger[_0x83a4('0xf')](_0x83a4('0xb'),_0x3adcff,_0x49ab91);_0x484363(_0x49ab91);});});}
\ No newline at end of file
+var _0xf599=['client','http','request','then','info','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf599,0x160));var _0x9f59=function(_0xf6f160,_0x20915a){_0xf6f160=_0xf6f160-0x0;var _0xd6aa49=_0xf599[_0xf6f160];return _0xd6aa49;};'use strict';var _=require(_0x9f59('0x0'));var util=require(_0x9f59('0x1'));var moment=require('moment');var BPromise=require(_0x9f59('0x2'));var rs=require(_0x9f59('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9f59('0x4'))['db'];var utils=require(_0x9f59('0x5'));var logger=require('../../config/logger')(_0x9f59('0x6'));var config=require(_0x9f59('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x9f59('0x8')][_0x9f59('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2bdb2d,_0x5e8084,_0x59cf54){return new BPromise(function(_0x1e37a6,_0x3e6bce){return client[_0x9f59('0xa')](_0x2bdb2d,_0x59cf54)[_0x9f59('0xb')](function(_0x301232){logger[_0x9f59('0xc')](_0x9f59('0xd'),_0x5e8084,'request\x20sent');logger['debug']('FreshsalesConfiguration,\x20%s,\x20%s,\x20%s',_0x5e8084,_0x9f59('0xe'),JSON[_0x9f59('0xf')](_0x301232));if(_0x301232['error']){if(_0x301232[_0x9f59('0x10')][_0x9f59('0x11')]===0x1f4){logger[_0x9f59('0x10')](_0x9f59('0xd'),_0x5e8084,_0x301232['error']['message']);return _0x3e6bce(_0x301232['error']['message']);}logger[_0x9f59('0x10')](_0x9f59('0xd'),_0x5e8084,_0x301232[_0x9f59('0x10')][_0x9f59('0x12')]);return _0x1e37a6(_0x301232[_0x9f59('0x10')]['message']);}else{logger[_0x9f59('0xc')](_0x9f59('0xd'),_0x5e8084,_0x9f59('0xe'));_0x1e37a6(_0x301232['result'][_0x9f59('0x12')]);}})[_0x9f59('0x13')](function(_0x2abae6){logger['error'](_0x9f59('0xd'),_0x5e8084,_0x2abae6);_0x3e6bce(_0x2abae6);});});}
\ No newline at end of file