Built motion from commit 5b761a7b.|2.5.36
[motion2.git] / server / api / intZohoField / intZohoField.rpc.js
index 1f32f55..637c682 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c5a=['http','then','ZohoField,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise'];(function(_0x21fc68,_0xf30aaa){var _0x3c9a15=function(_0x227772){while(--_0x227772){_0x21fc68['push'](_0x21fc68['shift']());}};_0x3c9a15(++_0xf30aaa);}(_0x9c5a,0x1c3));var _0xa9c5=function(_0x328458,_0x401432){_0x328458=_0x328458-0x0;var _0x39017d=_0x9c5a[_0x328458];return _0x39017d;};'use strict';var _=require(_0xa9c5('0x0'));var util=require(_0xa9c5('0x1'));var moment=require('moment');var BPromise=require(_0xa9c5('0x2'));var rs=require(_0xa9c5('0x3'));var fs=require('fs');var Redis=require(_0xa9c5('0x4'));var db=require(_0xa9c5('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xa9c5('0x6'))(_0xa9c5('0x7'));var config=require('../../config/environment');var jayson=require(_0xa9c5('0x8'));var client=jayson['client'][_0xa9c5('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3df556,_0x4cb597,_0x4b6db6){return new BPromise(function(_0x3d6b50,_0x16f331){return client['request'](_0x3df556,_0x4b6db6)[_0xa9c5('0xa')](function(_0x97f9e2){logger['info'](_0xa9c5('0xb'),_0x4cb597,_0xa9c5('0xc'));logger['debug']('ZohoField,\x20%s,\x20%s,\x20%s',_0x4cb597,_0xa9c5('0xc'),JSON[_0xa9c5('0xd')](_0x97f9e2));if(_0x97f9e2[_0xa9c5('0xe')]){if(_0x97f9e2[_0xa9c5('0xe')][_0xa9c5('0xf')]===0x1f4){logger[_0xa9c5('0xe')](_0xa9c5('0xb'),_0x4cb597,_0x97f9e2[_0xa9c5('0xe')][_0xa9c5('0x10')]);return _0x16f331(_0x97f9e2[_0xa9c5('0xe')]['message']);}logger[_0xa9c5('0xe')](_0xa9c5('0xb'),_0x4cb597,_0x97f9e2[_0xa9c5('0xe')][_0xa9c5('0x10')]);return _0x3d6b50(_0x97f9e2[_0xa9c5('0xe')][_0xa9c5('0x10')]);}else{logger[_0xa9c5('0x11')](_0xa9c5('0xb'),_0x4cb597,_0xa9c5('0xc'));_0x3d6b50(_0x97f9e2[_0xa9c5('0x12')]['message']);}})[_0xa9c5('0x13')](function(_0xd85c32){logger[_0xa9c5('0xe')]('ZohoField,\x20%s,\x20%s',_0x4cb597,_0xd85c32);_0x16f331(_0xd85c32);});});}
\ No newline at end of file
+var _0xdc95=['http','request','info','ZohoField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client'];(function(_0xd7b769,_0x152ed8){var _0x8903f0=function(_0x10f862){while(--_0x10f862){_0xd7b769['push'](_0xd7b769['shift']());}};_0x8903f0(++_0x152ed8);}(_0xdc95,0x1c4));var _0x5dc9=function(_0x1f8977,_0x58c2de){_0x1f8977=_0x1f8977-0x0;var _0x11049e=_0xdc95[_0x1f8977];return _0x11049e;};'use strict';var _=require(_0x5dc9('0x0'));var util=require(_0x5dc9('0x1'));var moment=require(_0x5dc9('0x2'));var BPromise=require(_0x5dc9('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5dc9('0x4'))['db'];var utils=require(_0x5dc9('0x5'));var logger=require(_0x5dc9('0x6'))('rpc');var config=require(_0x5dc9('0x7'));var jayson=require(_0x5dc9('0x8'));var client=jayson[_0x5dc9('0x9')][_0x5dc9('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5ac17,_0x596e3d,_0x1d71a4){return new BPromise(function(_0x18534a,_0x3f0a7f){return client[_0x5dc9('0xb')](_0x5ac17,_0x1d71a4)['then'](function(_0x4cee06){logger[_0x5dc9('0xc')](_0x5dc9('0xd'),_0x596e3d,_0x5dc9('0xe'));logger[_0x5dc9('0xf')]('ZohoField,\x20%s,\x20%s,\x20%s',_0x596e3d,_0x5dc9('0xe'),JSON[_0x5dc9('0x10')](_0x4cee06));if(_0x4cee06[_0x5dc9('0x11')]){if(_0x4cee06['error'][_0x5dc9('0x12')]===0x1f4){logger[_0x5dc9('0x11')](_0x5dc9('0xd'),_0x596e3d,_0x4cee06[_0x5dc9('0x11')][_0x5dc9('0x13')]);return _0x3f0a7f(_0x4cee06['error'][_0x5dc9('0x13')]);}logger[_0x5dc9('0x11')](_0x5dc9('0xd'),_0x596e3d,_0x4cee06[_0x5dc9('0x11')]['message']);return _0x18534a(_0x4cee06[_0x5dc9('0x11')][_0x5dc9('0x13')]);}else{logger[_0x5dc9('0xc')](_0x5dc9('0xd'),_0x596e3d,_0x5dc9('0xe'));_0x18534a(_0x4cee06[_0x5dc9('0x14')][_0x5dc9('0x13')]);}})[_0x5dc9('0x15')](function(_0x212789){logger['error'](_0x5dc9('0xd'),_0x596e3d,_0x212789);_0x3f0a7f(_0x212789);});});}
\ No newline at end of file