Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / intFreshsalesConfiguration / intFreshsalesConfiguration.rpc.js
index 4fac903..9f904b9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8624=['../../config/logger','../../config/environment','jayson/promise','client','http','request','then','FreshsalesConfiguration,\x20%s,\x20%s','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','lodash','util','moment','randomstring','ioredis'];(function(_0x5f0e12,_0x121f63){var _0x2fcfcc=function(_0x555a5f){while(--_0x555a5f){_0x5f0e12['push'](_0x5f0e12['shift']());}};_0x2fcfcc(++_0x121f63);}(_0x8624,0x95));var _0x4862=function(_0x51020b,_0x38c2c7){_0x51020b=_0x51020b-0x0;var _0x371e47=_0x8624[_0x51020b];return _0x371e47;};'use strict';var _=require(_0x4862('0x0'));var util=require(_0x4862('0x1'));var moment=require(_0x4862('0x2'));var BPromise=require('bluebird');var rs=require(_0x4862('0x3'));var fs=require('fs');var Redis=require(_0x4862('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x4862('0x5'))('rpc');var config=require(_0x4862('0x6'));var jayson=require(_0x4862('0x7'));var client=jayson[_0x4862('0x8')][_0x4862('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2e4260,_0x28fbe3,_0x47199){return new BPromise(function(_0x3df098,_0x4b9699){return client[_0x4862('0xa')](_0x2e4260,_0x47199)[_0x4862('0xb')](function(_0x1c3258){logger['info'](_0x4862('0xc'),_0x28fbe3,'request\x20sent');logger['debug'](_0x4862('0xd'),_0x28fbe3,_0x4862('0xe'),JSON[_0x4862('0xf')](_0x1c3258));if(_0x1c3258['error']){if(_0x1c3258[_0x4862('0x10')][_0x4862('0x11')]===0x1f4){logger[_0x4862('0x10')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x28fbe3,_0x1c3258['error'][_0x4862('0x12')]);return _0x4b9699(_0x1c3258[_0x4862('0x10')]['message']);}logger['error']('FreshsalesConfiguration,\x20%s,\x20%s',_0x28fbe3,_0x1c3258['error'][_0x4862('0x12')]);return _0x3df098(_0x1c3258[_0x4862('0x10')][_0x4862('0x12')]);}else{logger[_0x4862('0x13')](_0x4862('0xc'),_0x28fbe3,_0x4862('0xe'));_0x3df098(_0x1c3258[_0x4862('0x14')][_0x4862('0x12')]);}})[_0x4862('0x15')](function(_0x359adf){logger[_0x4862('0x10')](_0x4862('0xc'),_0x28fbe3,_0x359adf);_0x4b9699(_0x359adf);});});}
\ 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