Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / intSugarcrmField / intSugarcrmField.rpc.js
index 8e012f9..de9e8ba 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5eb8=['info','SugarcrmField,\x20%s,\x20%s','request\x20sent','debug','SugarcrmField,\x20%s,\x20%s,\x20%s','error','message','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x3d3d02,_0x56f516){var _0x56154e=function(_0x30ff78){while(--_0x30ff78){_0x3d3d02['push'](_0x3d3d02['shift']());}};_0x56154e(++_0x56f516);}(_0x5eb8,0xb0));var _0x85eb=function(_0x1faaa1,_0x1568dd){_0x1faaa1=_0x1faaa1-0x0;var _0x994ec=_0x5eb8[_0x1faaa1];return _0x994ec;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x85eb('0x0'));var BPromise=require(_0x85eb('0x1'));var rs=require(_0x85eb('0x2'));var fs=require('fs');var Redis=require(_0x85eb('0x3'));var db=require(_0x85eb('0x4'))['db'];var utils=require(_0x85eb('0x5'));var logger=require(_0x85eb('0x6'))(_0x85eb('0x7'));var config=require(_0x85eb('0x8'));var jayson=require(_0x85eb('0x9'));var client=jayson[_0x85eb('0xa')][_0x85eb('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4a8814,_0x16d7b9,_0x3af658){return new BPromise(function(_0x448345,_0x5cd4ec){return client[_0x85eb('0xc')](_0x4a8814,_0x3af658)['then'](function(_0x1f0036){logger[_0x85eb('0xd')](_0x85eb('0xe'),_0x16d7b9,_0x85eb('0xf'));logger[_0x85eb('0x10')](_0x85eb('0x11'),_0x16d7b9,_0x85eb('0xf'),JSON['stringify'](_0x1f0036));if(_0x1f0036[_0x85eb('0x12')]){if(_0x1f0036[_0x85eb('0x12')]['code']===0x1f4){logger[_0x85eb('0x12')](_0x85eb('0xe'),_0x16d7b9,_0x1f0036[_0x85eb('0x12')][_0x85eb('0x13')]);return _0x5cd4ec(_0x1f0036['error']['message']);}logger[_0x85eb('0x12')]('SugarcrmField,\x20%s,\x20%s',_0x16d7b9,_0x1f0036[_0x85eb('0x12')][_0x85eb('0x13')]);return _0x448345(_0x1f0036[_0x85eb('0x12')][_0x85eb('0x13')]);}else{logger[_0x85eb('0xd')]('SugarcrmField,\x20%s,\x20%s',_0x16d7b9,_0x85eb('0xf'));_0x448345(_0x1f0036['result'][_0x85eb('0x13')]);}})[_0x85eb('0x14')](function(_0x3e23e8){logger[_0x85eb('0x12')]('SugarcrmField,\x20%s,\x20%s',_0x16d7b9,_0x3e23e8);_0x5cd4ec(_0x3e23e8);});});}
\ No newline at end of file
+var _0x39ab=['stringify','error','SugarcrmField,\x20%s,\x20%s','message','info','result','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','http','request','then','request\x20sent','debug','SugarcrmField,\x20%s,\x20%s,\x20%s'];(function(_0x3ba583,_0x20db3b){var _0x349767=function(_0x489376){while(--_0x489376){_0x3ba583['push'](_0x3ba583['shift']());}};_0x349767(++_0x20db3b);}(_0x39ab,0x118));var _0xb39a=function(_0x5c4443,_0x4fe225){_0x5c4443=_0x5c4443-0x0;var _0xac7ad4=_0x39ab[_0x5c4443];return _0xac7ad4;};'use strict';var _=require(_0xb39a('0x0'));var util=require('util');var moment=require(_0xb39a('0x1'));var BPromise=require('bluebird');var rs=require(_0xb39a('0x2'));var fs=require('fs');var Redis=require(_0xb39a('0x3'));var db=require(_0xb39a('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xb39a('0x5'))(_0xb39a('0x6'));var config=require(_0xb39a('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xb39a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x399cd6,_0x44d425,_0x8c5eb){return new BPromise(function(_0x152c92,_0x475edd){return client[_0xb39a('0x9')](_0x399cd6,_0x8c5eb)[_0xb39a('0xa')](function(_0xc25846){logger['info']('SugarcrmField,\x20%s,\x20%s',_0x44d425,_0xb39a('0xb'));logger[_0xb39a('0xc')](_0xb39a('0xd'),_0x44d425,_0xb39a('0xb'),JSON[_0xb39a('0xe')](_0xc25846));if(_0xc25846[_0xb39a('0xf')]){if(_0xc25846[_0xb39a('0xf')]['code']===0x1f4){logger[_0xb39a('0xf')](_0xb39a('0x10'),_0x44d425,_0xc25846[_0xb39a('0xf')][_0xb39a('0x11')]);return _0x475edd(_0xc25846[_0xb39a('0xf')][_0xb39a('0x11')]);}logger[_0xb39a('0xf')](_0xb39a('0x10'),_0x44d425,_0xc25846['error'][_0xb39a('0x11')]);return _0x152c92(_0xc25846[_0xb39a('0xf')][_0xb39a('0x11')]);}else{logger[_0xb39a('0x12')](_0xb39a('0x10'),_0x44d425,'request\x20sent');_0x152c92(_0xc25846[_0xb39a('0x13')][_0xb39a('0x11')]);}})[_0xb39a('0x14')](function(_0x5ed964){logger[_0xb39a('0xf')]('SugarcrmField,\x20%s,\x20%s',_0x44d425,_0x5ed964);_0x475edd(_0x5ed964);});});}
\ No newline at end of file