Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / intSugarcrmField / intSugarcrmField.rpc.js
index 8e1c96d..7eae76a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x680e=['error','code','message','info','catch','lodash','util','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','request','then','SugarcrmField,\x20%s,\x20%s','debug','SugarcrmField,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x297fd3,_0x115406){var _0x2af381=function(_0x1dd31b){while(--_0x1dd31b){_0x297fd3['push'](_0x297fd3['shift']());}};_0x2af381(++_0x115406);}(_0x680e,0x10f));var _0xe680=function(_0x57f3bb,_0x1bc2fd){_0x57f3bb=_0x57f3bb-0x0;var _0x202773=_0x680e[_0x57f3bb];return _0x202773;};'use strict';var _=require(_0xe680('0x0'));var util=require(_0xe680('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xe680('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe680('0x3'))['db'];var utils=require(_0xe680('0x4'));var logger=require(_0xe680('0x5'))('rpc');var config=require(_0xe680('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0xe680('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x1cc864,_0x4847d0,_0x4a1d27){return new BPromise(function(_0x564b3a,_0x4015f3){return client[_0xe680('0x8')](_0x1cc864,_0x4a1d27)[_0xe680('0x9')](function(_0x5b63cf){logger['info'](_0xe680('0xa'),_0x4847d0,'request\x20sent');logger[_0xe680('0xb')](_0xe680('0xc'),_0x4847d0,_0xe680('0xd'),JSON['stringify'](_0x5b63cf));if(_0x5b63cf[_0xe680('0xe')]){if(_0x5b63cf[_0xe680('0xe')][_0xe680('0xf')]===0x1f4){logger[_0xe680('0xe')](_0xe680('0xa'),_0x4847d0,_0x5b63cf[_0xe680('0xe')][_0xe680('0x10')]);return _0x4015f3(_0x5b63cf[_0xe680('0xe')]['message']);}logger[_0xe680('0xe')]('SugarcrmField,\x20%s,\x20%s',_0x4847d0,_0x5b63cf[_0xe680('0xe')][_0xe680('0x10')]);return _0x564b3a(_0x5b63cf[_0xe680('0xe')][_0xe680('0x10')]);}else{logger[_0xe680('0x11')](_0xe680('0xa'),_0x4847d0,_0xe680('0xd'));_0x564b3a(_0x5b63cf['result'][_0xe680('0x10')]);}})[_0xe680('0x12')](function(_0x43da0e){logger['error'](_0xe680('0xa'),_0x4847d0,_0x43da0e);_0x4015f3(_0x43da0e);});});}
\ No newline at end of file
+var _0x9f06=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','debug','error','code','message','SugarcrmField,\x20%s,\x20%s','info','result','lodash','util'];(function(_0x160c73,_0x2ee678){var _0xd9302=function(_0x169454){while(--_0x169454){_0x160c73['push'](_0x160c73['shift']());}};_0xd9302(++_0x2ee678);}(_0x9f06,0x1e2));var _0x69f0=function(_0x30d5a8,_0x25d8ab){_0x30d5a8=_0x30d5a8-0x0;var _0x3c33d5=_0x9f06[_0x30d5a8];return _0x3c33d5;};'use strict';var _=require(_0x69f0('0x0'));var util=require(_0x69f0('0x1'));var moment=require('moment');var BPromise=require(_0x69f0('0x2'));var rs=require(_0x69f0('0x3'));var fs=require('fs');var Redis=require(_0x69f0('0x4'));var db=require(_0x69f0('0x5'))['db'];var utils=require(_0x69f0('0x6'));var logger=require('../../config/logger')(_0x69f0('0x7'));var config=require(_0x69f0('0x8'));var jayson=require(_0x69f0('0x9'));var client=jayson[_0x69f0('0xa')][_0x69f0('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2ca22f,_0x21ff75,_0x598e8b){return new BPromise(function(_0x4c8922,_0x4eb19f){return client[_0x69f0('0xc')](_0x2ca22f,_0x598e8b)[_0x69f0('0xd')](function(_0x3577e4){logger['info']('SugarcrmField,\x20%s,\x20%s',_0x21ff75,_0x69f0('0xe'));logger[_0x69f0('0xf')]('SugarcrmField,\x20%s,\x20%s,\x20%s',_0x21ff75,'request\x20sent',JSON['stringify'](_0x3577e4));if(_0x3577e4[_0x69f0('0x10')]){if(_0x3577e4[_0x69f0('0x10')][_0x69f0('0x11')]===0x1f4){logger[_0x69f0('0x10')]('SugarcrmField,\x20%s,\x20%s',_0x21ff75,_0x3577e4['error'][_0x69f0('0x12')]);return _0x4eb19f(_0x3577e4[_0x69f0('0x10')][_0x69f0('0x12')]);}logger['error'](_0x69f0('0x13'),_0x21ff75,_0x3577e4[_0x69f0('0x10')][_0x69f0('0x12')]);return _0x4c8922(_0x3577e4['error'][_0x69f0('0x12')]);}else{logger[_0x69f0('0x14')](_0x69f0('0x13'),_0x21ff75,_0x69f0('0xe'));_0x4c8922(_0x3577e4[_0x69f0('0x15')][_0x69f0('0x12')]);}})['catch'](function(_0x5223e9){logger[_0x69f0('0x10')](_0x69f0('0x13'),_0x21ff75,_0x5223e9);_0x4eb19f(_0x5223e9);});});}
\ No newline at end of file