Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / intSalesforceField / intSalesforceField.rpc.js
index 5849bba..d0e36fd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x32f6=['http','request','info','SalesforceField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0x32f6,0x182));var _0x632f=function(_0x1573ea,_0x434f02){_0x1573ea=_0x1573ea-0x0;var _0x51c0e2=_0x32f6[_0x1573ea];return _0x51c0e2;};'use strict';var _=require(_0x632f('0x0'));var util=require('util');var moment=require(_0x632f('0x1'));var BPromise=require(_0x632f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x632f('0x3'));var db=require(_0x632f('0x4'))['db'];var utils=require(_0x632f('0x5'));var logger=require(_0x632f('0x6'))(_0x632f('0x7'));var config=require(_0x632f('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x632f('0x9')][_0x632f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x15b56a,_0x2a9e9c,_0x41c88a){return new BPromise(function(_0x5bbac7,_0x179c6e){return client[_0x632f('0xb')](_0x15b56a,_0x41c88a)['then'](function(_0x3065b8){logger[_0x632f('0xc')](_0x632f('0xd'),_0x2a9e9c,_0x632f('0xe'));logger[_0x632f('0xf')]('SalesforceField,\x20%s,\x20%s,\x20%s',_0x2a9e9c,_0x632f('0xe'),JSON[_0x632f('0x10')](_0x3065b8));if(_0x3065b8[_0x632f('0x11')]){if(_0x3065b8[_0x632f('0x11')][_0x632f('0x12')]===0x1f4){logger[_0x632f('0x11')]('SalesforceField,\x20%s,\x20%s',_0x2a9e9c,_0x3065b8[_0x632f('0x11')][_0x632f('0x13')]);return _0x179c6e(_0x3065b8['error']['message']);}logger[_0x632f('0x11')](_0x632f('0xd'),_0x2a9e9c,_0x3065b8[_0x632f('0x11')][_0x632f('0x13')]);return _0x5bbac7(_0x3065b8[_0x632f('0x11')][_0x632f('0x13')]);}else{logger[_0x632f('0xc')](_0x632f('0xd'),_0x2a9e9c,_0x632f('0xe'));_0x5bbac7(_0x3065b8[_0x632f('0x14')][_0x632f('0x13')]);}})[_0x632f('0x15')](function(_0x20aedd){logger[_0x632f('0x11')](_0x632f('0xd'),_0x2a9e9c,_0x20aedd);_0x179c6e(_0x20aedd);});});}
\ No newline at end of file
+var _0x5ab7=['stringify','error','code','message','info','result','catch','lodash','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','SalesforceField,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x558d39,_0x23e411){var _0x491bee=function(_0x38c069){while(--_0x38c069){_0x558d39['push'](_0x558d39['shift']());}};_0x491bee(++_0x23e411);}(_0x5ab7,0xc4));var _0x75ab=function(_0x49e5cf,_0x5d389e){_0x49e5cf=_0x49e5cf-0x0;var _0x3c2add=_0x5ab7[_0x49e5cf];return _0x3c2add;};'use strict';var _=require(_0x75ab('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x75ab('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x75ab('0x2'))['db'];var utils=require(_0x75ab('0x3'));var logger=require(_0x75ab('0x4'))(_0x75ab('0x5'));var config=require(_0x75ab('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x75ab('0x7')][_0x75ab('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3df70c,_0x314c3a,_0x508919){return new BPromise(function(_0x3b1ba8,_0x4b696d){return client[_0x75ab('0x9')](_0x3df70c,_0x508919)[_0x75ab('0xa')](function(_0x16c793){logger['info'](_0x75ab('0xb'),_0x314c3a,_0x75ab('0xc'));logger[_0x75ab('0xd')]('SalesforceField,\x20%s,\x20%s,\x20%s',_0x314c3a,'request\x20sent',JSON[_0x75ab('0xe')](_0x16c793));if(_0x16c793['error']){if(_0x16c793[_0x75ab('0xf')][_0x75ab('0x10')]===0x1f4){logger[_0x75ab('0xf')](_0x75ab('0xb'),_0x314c3a,_0x16c793[_0x75ab('0xf')][_0x75ab('0x11')]);return _0x4b696d(_0x16c793['error'][_0x75ab('0x11')]);}logger[_0x75ab('0xf')](_0x75ab('0xb'),_0x314c3a,_0x16c793['error'][_0x75ab('0x11')]);return _0x3b1ba8(_0x16c793['error'][_0x75ab('0x11')]);}else{logger[_0x75ab('0x12')]('SalesforceField,\x20%s,\x20%s',_0x314c3a,'request\x20sent');_0x3b1ba8(_0x16c793[_0x75ab('0x13')][_0x75ab('0x11')]);}})[_0x75ab('0x14')](function(_0x20ba93){logger['error'](_0x75ab('0xb'),_0x314c3a,_0x20ba93);_0x4b696d(_0x20ba93);});});}
\ No newline at end of file