Built motion from commit 52c8a02d.|2.6.29
[motion2.git] / server / api / intSugarcrmConfiguration / intSugarcrmConfiguration.rpc.js
index d347fba..6df189a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5768=['stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','jayson/promise','http','then','info','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x5768,0x8a));var _0x8576=function(_0x1beef3,_0x57c4b8){_0x1beef3=_0x1beef3-0x0;var _0x5af964=_0x5768[_0x1beef3];return _0x5af964;};'use strict';var _=require(_0x8576('0x0'));var util=require(_0x8576('0x1'));var moment=require(_0x8576('0x2'));var BPromise=require(_0x8576('0x3'));var rs=require(_0x8576('0x4'));var fs=require('fs');var Redis=require(_0x8576('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x8576('0x6'));var logger=require(_0x8576('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x8576('0x8'));var client=jayson['client'][_0x8576('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x291cd5,_0x301df7,_0x4d9e39){return new BPromise(function(_0xfaef4f,_0x326be5){return client['request'](_0x291cd5,_0x4d9e39)[_0x8576('0xa')](function(_0x13a016){logger[_0x8576('0xb')](_0x8576('0xc'),_0x301df7,_0x8576('0xd'));logger[_0x8576('0xe')](_0x8576('0xf'),_0x301df7,_0x8576('0xd'),JSON[_0x8576('0x10')](_0x13a016));if(_0x13a016[_0x8576('0x11')]){if(_0x13a016[_0x8576('0x11')][_0x8576('0x12')]===0x1f4){logger[_0x8576('0x11')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x301df7,_0x13a016[_0x8576('0x11')][_0x8576('0x13')]);return _0x326be5(_0x13a016[_0x8576('0x11')][_0x8576('0x13')]);}logger['error'](_0x8576('0xc'),_0x301df7,_0x13a016[_0x8576('0x11')]['message']);return _0xfaef4f(_0x13a016[_0x8576('0x11')][_0x8576('0x13')]);}else{logger['info'](_0x8576('0xc'),_0x301df7,_0x8576('0xd'));_0xfaef4f(_0x13a016[_0x8576('0x14')]['message']);}})[_0x8576('0x15')](function(_0x55e09b){logger[_0x8576('0x11')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x301df7,_0x55e09b);_0x326be5(_0x55e09b);});});}
\ No newline at end of file
+var _0xf462=['catch','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','SugarcrmConfiguration,\x20%s,\x20%s','message','result'];(function(_0x18bf85,_0x67d996){var _0x3a87e9=function(_0x248c7b){while(--_0x248c7b){_0x18bf85['push'](_0x18bf85['shift']());}};_0x3a87e9(++_0x67d996);}(_0xf462,0xb9));var _0x2f46=function(_0x412e27,_0x20a978){_0x412e27=_0x412e27-0x0;var _0x53da42=_0xf462[_0x412e27];return _0x53da42;};'use strict';var _=require(_0x2f46('0x0'));var util=require(_0x2f46('0x1'));var moment=require(_0x2f46('0x2'));var BPromise=require(_0x2f46('0x3'));var rs=require(_0x2f46('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x2f46('0x5'));var logger=require(_0x2f46('0x6'))(_0x2f46('0x7'));var config=require(_0x2f46('0x8'));var jayson=require(_0x2f46('0x9'));var client=jayson['client'][_0x2f46('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2d4e96,_0x480456,_0x149ddc){return new BPromise(function(_0x3734ce,_0x49b0da){return client[_0x2f46('0xb')](_0x2d4e96,_0x149ddc)[_0x2f46('0xc')](function(_0x174aea){logger[_0x2f46('0xd')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x480456,'request\x20sent');logger['debug'](_0x2f46('0xe'),_0x480456,_0x2f46('0xf'),JSON[_0x2f46('0x10')](_0x174aea));if(_0x174aea[_0x2f46('0x11')]){if(_0x174aea['error'][_0x2f46('0x12')]===0x1f4){logger[_0x2f46('0x11')](_0x2f46('0x13'),_0x480456,_0x174aea['error']['message']);return _0x49b0da(_0x174aea[_0x2f46('0x11')][_0x2f46('0x14')]);}logger['error']('SugarcrmConfiguration,\x20%s,\x20%s',_0x480456,_0x174aea['error']['message']);return _0x3734ce(_0x174aea[_0x2f46('0x11')]['message']);}else{logger['info']('SugarcrmConfiguration,\x20%s,\x20%s',_0x480456,_0x2f46('0xf'));_0x3734ce(_0x174aea[_0x2f46('0x15')][_0x2f46('0x14')]);}})[_0x2f46('0x16')](function(_0x2d44ec){logger['error'](_0x2f46('0x13'),_0x480456,_0x2d44ec);_0x49b0da(_0x2d44ec);});});}
\ No newline at end of file