Built motion from commit e6806ed6.|2.6.0
[motion2.git] / server / api / intFreshsalesConfiguration / intFreshsalesConfiguration.rpc.js
index 7efea14..113ed72 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa963=['http','request','then','info','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','../../config/environment','jayson/promise','client'];(function(_0x197899,_0x297080){var _0x4dbec3=function(_0x10a396){while(--_0x10a396){_0x197899['push'](_0x197899['shift']());}};_0x4dbec3(++_0x297080);}(_0xa963,0x97));var _0x3a96=function(_0x34f922,_0x5521c2){_0x34f922=_0x34f922-0x0;var _0x5aefc2=_0xa963[_0x34f922];return _0x5aefc2;};'use strict';var _=require(_0x3a96('0x0'));var util=require(_0x3a96('0x1'));var moment=require(_0x3a96('0x2'));var BPromise=require(_0x3a96('0x3'));var rs=require(_0x3a96('0x4'));var fs=require('fs');var Redis=require(_0x3a96('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x3a96('0x6'))('rpc');var config=require(_0x3a96('0x7'));var jayson=require(_0x3a96('0x8'));var client=jayson[_0x3a96('0x9')][_0x3a96('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5a86dc,_0x3c0415,_0x4c3d54){return new BPromise(function(_0x4be0a0,_0x258544){return client[_0x3a96('0xb')](_0x5a86dc,_0x4c3d54)[_0x3a96('0xc')](function(_0x46194b){logger[_0x3a96('0xd')](_0x3a96('0xe'),_0x3c0415,_0x3a96('0xf'));logger['debug'](_0x3a96('0x10'),_0x3c0415,_0x3a96('0xf'),JSON[_0x3a96('0x11')](_0x46194b));if(_0x46194b[_0x3a96('0x12')]){if(_0x46194b[_0x3a96('0x12')][_0x3a96('0x13')]===0x1f4){logger[_0x3a96('0x12')](_0x3a96('0xe'),_0x3c0415,_0x46194b[_0x3a96('0x12')][_0x3a96('0x14')]);return _0x258544(_0x46194b[_0x3a96('0x12')][_0x3a96('0x14')]);}logger[_0x3a96('0x12')](_0x3a96('0xe'),_0x3c0415,_0x46194b[_0x3a96('0x12')][_0x3a96('0x14')]);return _0x4be0a0(_0x46194b[_0x3a96('0x12')][_0x3a96('0x14')]);}else{logger[_0x3a96('0xd')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x3c0415,_0x3a96('0xf'));_0x4be0a0(_0x46194b[_0x3a96('0x15')][_0x3a96('0x14')]);}})[_0x3a96('0x16')](function(_0x105ec6){logger[_0x3a96('0x12')](_0x3a96('0xe'),_0x3c0415,_0x105ec6);_0x258544(_0x105ec6);});});}
\ No newline at end of file
+var _0x0844=['../../config/logger','../../config/environment','request','then','info','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils'];(function(_0x1fa183,_0x4c9162){var _0x1bff33=function(_0x45a949){while(--_0x45a949){_0x1fa183['push'](_0x1fa183['shift']());}};_0x1bff33(++_0x4c9162);}(_0x0844,0xa5));var _0x4084=function(_0x3289c5,_0x4a98b1){_0x3289c5=_0x3289c5-0x0;var _0x45df2c=_0x0844[_0x3289c5];return _0x45df2c;};'use strict';var _=require('lodash');var util=require(_0x4084('0x0'));var moment=require(_0x4084('0x1'));var BPromise=require(_0x4084('0x2'));var rs=require(_0x4084('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4084('0x4'))['db'];var utils=require(_0x4084('0x5'));var logger=require(_0x4084('0x6'))('rpc');var config=require(_0x4084('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x31d69c,_0x328355,_0x1ee77f){return new BPromise(function(_0xf5866d,_0x114604){return client[_0x4084('0x8')](_0x31d69c,_0x1ee77f)[_0x4084('0x9')](function(_0x2f69f4){logger[_0x4084('0xa')](_0x4084('0xb'),_0x328355,_0x4084('0xc'));logger['debug']('FreshsalesConfiguration,\x20%s,\x20%s,\x20%s',_0x328355,_0x4084('0xc'),JSON[_0x4084('0xd')](_0x2f69f4));if(_0x2f69f4[_0x4084('0xe')]){if(_0x2f69f4[_0x4084('0xe')][_0x4084('0xf')]===0x1f4){logger['error'](_0x4084('0xb'),_0x328355,_0x2f69f4['error'][_0x4084('0x10')]);return _0x114604(_0x2f69f4['error'][_0x4084('0x10')]);}logger[_0x4084('0xe')](_0x4084('0xb'),_0x328355,_0x2f69f4[_0x4084('0xe')][_0x4084('0x10')]);return _0xf5866d(_0x2f69f4[_0x4084('0xe')][_0x4084('0x10')]);}else{logger['info'](_0x4084('0xb'),_0x328355,'request\x20sent');_0xf5866d(_0x2f69f4[_0x4084('0x11')][_0x4084('0x10')]);}})[_0x4084('0x12')](function(_0x5a64e9){logger['error'](_0x4084('0xb'),_0x328355,_0x5a64e9);_0x114604(_0x5a64e9);});});}
\ No newline at end of file