Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / api / intSugarcrmField / intSugarcrmField.rpc.js
index b65f17f..9ed8778 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(_0x5e2a96,_0x3f431c){var _0x3c4b5c=function(_0x4428aa){while(--_0x4428aa){_0x5e2a96['push'](_0x5e2a96['shift']());}};_0x3c4b5c(++_0x3f431c);}(_0x5eb8,0xb0));var _0x85eb=function(_0x4990d5,_0xe2c486){_0x4990d5=_0x4990d5-0x0;var _0x275e25=_0x5eb8[_0x4990d5];return _0x275e25;};'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 _0xf50f=['info','catch','lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','SugarcrmField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message'];(function(_0x1227bc,_0x398a69){var _0x14688a=function(_0x4b90b5){while(--_0x4b90b5){_0x1227bc['push'](_0x1227bc['shift']());}};_0x14688a(++_0x398a69);}(_0xf50f,0xde));var _0xff50=function(_0x3c907d,_0x4642f0){_0x3c907d=_0x3c907d-0x0;var _0x66a576=_0xf50f[_0x3c907d];return _0x66a576;};'use strict';var _=require(_0xff50('0x0'));var util=require('util');var moment=require(_0xff50('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xff50('0x2'));var db=require(_0xff50('0x3'))['db'];var utils=require(_0xff50('0x4'));var logger=require(_0xff50('0x5'))(_0xff50('0x6'));var config=require(_0xff50('0x7'));var jayson=require(_0xff50('0x8'));var client=jayson[_0xff50('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2bfc21,_0x11e7c5,_0x31966a){return new BPromise(function(_0x34ada0,_0x1f4ca3){return client[_0xff50('0xa')](_0x2bfc21,_0x31966a)[_0xff50('0xb')](function(_0x2c227a){logger['info'](_0xff50('0xc'),_0x11e7c5,_0xff50('0xd'));logger[_0xff50('0xe')]('SugarcrmField,\x20%s,\x20%s,\x20%s',_0x11e7c5,_0xff50('0xd'),JSON[_0xff50('0xf')](_0x2c227a));if(_0x2c227a[_0xff50('0x10')]){if(_0x2c227a[_0xff50('0x10')]['code']===0x1f4){logger[_0xff50('0x10')](_0xff50('0xc'),_0x11e7c5,_0x2c227a['error']['message']);return _0x1f4ca3(_0x2c227a['error'][_0xff50('0x11')]);}logger[_0xff50('0x10')](_0xff50('0xc'),_0x11e7c5,_0x2c227a['error'][_0xff50('0x11')]);return _0x34ada0(_0x2c227a[_0xff50('0x10')][_0xff50('0x11')]);}else{logger[_0xff50('0x12')](_0xff50('0xc'),_0x11e7c5,_0xff50('0xd'));_0x34ada0(_0x2c227a['result'][_0xff50('0x11')]);}})[_0xff50('0x13')](function(_0x429cd8){logger[_0xff50('0x10')](_0xff50('0xc'),_0x11e7c5,_0x429cd8);_0x1f4ca3(_0x429cd8);});});}
\ No newline at end of file