Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / intFreshsalesConfiguration / intFreshsalesConfiguration.rpc.js
index 7784131..c1de070 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf97b=['message','result','lodash','util','moment','bluebird','../../mysqldb','../../config/logger','rpc','../../config/environment','http','request','info','request\x20sent','stringify','error','code','FreshsalesConfiguration,\x20%s,\x20%s'];(function(_0x4268c4,_0x244f25){var _0x1e01f8=function(_0x1b3091){while(--_0x1b3091){_0x4268c4['push'](_0x4268c4['shift']());}};_0x1e01f8(++_0x244f25);}(_0xf97b,0x1b2));var _0xbf97=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0xf97b[_0x2be8c2];return _0x97f531;};'use strict';var _=require(_0xbf97('0x0'));var util=require(_0xbf97('0x1'));var moment=require(_0xbf97('0x2'));var BPromise=require(_0xbf97('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbf97('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xbf97('0x5'))(_0xbf97('0x6'));var config=require(_0xbf97('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xbf97('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x562dff,_0x4f0ee6,_0x59ecaa){return new BPromise(function(_0xff2327,_0x55211a){return client[_0xbf97('0x9')](_0x562dff,_0x59ecaa)['then'](function(_0x20e183){logger[_0xbf97('0xa')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x4f0ee6,_0xbf97('0xb'));logger['debug']('FreshsalesConfiguration,\x20%s,\x20%s,\x20%s',_0x4f0ee6,'request\x20sent',JSON[_0xbf97('0xc')](_0x20e183));if(_0x20e183[_0xbf97('0xd')]){if(_0x20e183[_0xbf97('0xd')][_0xbf97('0xe')]===0x1f4){logger[_0xbf97('0xd')](_0xbf97('0xf'),_0x4f0ee6,_0x20e183[_0xbf97('0xd')][_0xbf97('0x10')]);return _0x55211a(_0x20e183['error'][_0xbf97('0x10')]);}logger[_0xbf97('0xd')](_0xbf97('0xf'),_0x4f0ee6,_0x20e183[_0xbf97('0xd')][_0xbf97('0x10')]);return _0xff2327(_0x20e183[_0xbf97('0xd')][_0xbf97('0x10')]);}else{logger[_0xbf97('0xa')](_0xbf97('0xf'),_0x4f0ee6,_0xbf97('0xb'));_0xff2327(_0x20e183[_0xbf97('0x11')][_0xbf97('0x10')]);}})['catch'](function(_0x12dbc0){logger[_0xbf97('0xd')](_0xbf97('0xf'),_0x4f0ee6,_0x12dbc0);_0x55211a(_0x12dbc0);});});}
\ No newline at end of file
+var _0x3a64=['jayson/promise','http','request','then','request\x20sent','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','stringify','code','FreshsalesConfiguration,\x20%s,\x20%s','error','message','info','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x544463,_0x214963){var _0x1add2a=function(_0x5e1006){while(--_0x5e1006){_0x544463['push'](_0x544463['shift']());}};_0x1add2a(++_0x214963);}(_0x3a64,0x92));var _0x43a6=function(_0x4ed520,_0x21be63){_0x4ed520=_0x4ed520-0x0;var _0x4415a6=_0x3a64[_0x4ed520];return _0x4415a6;};'use strict';var _=require(_0x43a6('0x0'));var util=require(_0x43a6('0x1'));var moment=require(_0x43a6('0x2'));var BPromise=require(_0x43a6('0x3'));var rs=require(_0x43a6('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x43a6('0x5'))['db'];var utils=require(_0x43a6('0x6'));var logger=require(_0x43a6('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x43a6('0x8'));var client=jayson['client'][_0x43a6('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x39ec04,_0x585a87,_0x50afb3){return new BPromise(function(_0x4427eb,_0x9d8bf0){return client[_0x43a6('0xa')](_0x39ec04,_0x50afb3)[_0x43a6('0xb')](function(_0x5c88d3){logger['info']('FreshsalesConfiguration,\x20%s,\x20%s',_0x585a87,_0x43a6('0xc'));logger['debug'](_0x43a6('0xd'),_0x585a87,_0x43a6('0xc'),JSON[_0x43a6('0xe')](_0x5c88d3));if(_0x5c88d3['error']){if(_0x5c88d3['error'][_0x43a6('0xf')]===0x1f4){logger['error'](_0x43a6('0x10'),_0x585a87,_0x5c88d3[_0x43a6('0x11')]['message']);return _0x9d8bf0(_0x5c88d3[_0x43a6('0x11')][_0x43a6('0x12')]);}logger[_0x43a6('0x11')](_0x43a6('0x10'),_0x585a87,_0x5c88d3['error']['message']);return _0x4427eb(_0x5c88d3[_0x43a6('0x11')][_0x43a6('0x12')]);}else{logger[_0x43a6('0x13')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x585a87,_0x43a6('0xc'));_0x4427eb(_0x5c88d3[_0x43a6('0x14')]['message']);}})[_0x43a6('0x15')](function(_0xc38e3a){logger['error'](_0x43a6('0x10'),_0x585a87,_0xc38e3a);_0x9d8bf0(_0xc38e3a);});});}
\ No newline at end of file