Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / intZendeskField / intZendeskField.rpc.js
index e56badf..5a79568 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xff65=['jayson/promise','client','http','request','then','ZendeskField,\x20%s,\x20%s','request\x20sent','debug','ZendeskField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x1f6835,_0xff3520){var _0x10aee2=function(_0x5600f0){while(--_0x5600f0){_0x1f6835['push'](_0x1f6835['shift']());}};_0x10aee2(++_0xff3520);}(_0xff65,0x6b));var _0x5ff6=function(_0x2d34d6,_0x397ff9){_0x2d34d6=_0x2d34d6-0x0;var _0x1d3d12=_0xff65[_0x2d34d6];return _0x1d3d12;};'use strict';var _=require(_0x5ff6('0x0'));var util=require('util');var moment=require(_0x5ff6('0x1'));var BPromise=require(_0x5ff6('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5ff6('0x3'));var db=require(_0x5ff6('0x4'))['db'];var utils=require(_0x5ff6('0x5'));var logger=require(_0x5ff6('0x6'))(_0x5ff6('0x7'));var config=require('../../config/environment');var jayson=require(_0x5ff6('0x8'));var client=jayson[_0x5ff6('0x9')][_0x5ff6('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4fbad5,_0x5d7992,_0x3b5700){return new BPromise(function(_0x21b265,_0xb17b7d){return client[_0x5ff6('0xb')](_0x4fbad5,_0x3b5700)[_0x5ff6('0xc')](function(_0x5d27df){logger['info'](_0x5ff6('0xd'),_0x5d7992,_0x5ff6('0xe'));logger[_0x5ff6('0xf')](_0x5ff6('0x10'),_0x5d7992,'request\x20sent',JSON[_0x5ff6('0x11')](_0x5d27df));if(_0x5d27df[_0x5ff6('0x12')]){if(_0x5d27df['error'][_0x5ff6('0x13')]===0x1f4){logger[_0x5ff6('0x12')](_0x5ff6('0xd'),_0x5d7992,_0x5d27df[_0x5ff6('0x12')][_0x5ff6('0x14')]);return _0xb17b7d(_0x5d27df[_0x5ff6('0x12')]['message']);}logger['error'](_0x5ff6('0xd'),_0x5d7992,_0x5d27df[_0x5ff6('0x12')][_0x5ff6('0x14')]);return _0x21b265(_0x5d27df['error'][_0x5ff6('0x14')]);}else{logger[_0x5ff6('0x15')](_0x5ff6('0xd'),_0x5d7992,'request\x20sent');_0x21b265(_0x5d27df['result'][_0x5ff6('0x14')]);}})[_0x5ff6('0x16')](function(_0x197f0e){logger[_0x5ff6('0x12')](_0x5ff6('0xd'),_0x5d7992,_0x197f0e);_0xb17b7d(_0x197f0e);});});}
\ No newline at end of file
+var _0xa255=['request','info','ZendeskField,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','catch','util','moment','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x43ff49,_0x1efbd2){var _0x125785=function(_0x2479d6){while(--_0x2479d6){_0x43ff49['push'](_0x43ff49['shift']());}};_0x125785(++_0x1efbd2);}(_0xa255,0x109));var _0x5a25=function(_0x6fa74c,_0x1ebc8b){_0x6fa74c=_0x6fa74c-0x0;var _0x22d795=_0xa255[_0x6fa74c];return _0x22d795;};'use strict';var _=require('lodash');var util=require(_0x5a25('0x0'));var moment=require(_0x5a25('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5a25('0x2'))['db'];var utils=require(_0x5a25('0x3'));var logger=require(_0x5a25('0x4'))(_0x5a25('0x5'));var config=require(_0x5a25('0x6'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x1f68ca,_0x5bc02a,_0x5231e9){return new BPromise(function(_0x171236,_0x304bc6){return client[_0x5a25('0x7')](_0x1f68ca,_0x5231e9)['then'](function(_0x6a0ebe){logger[_0x5a25('0x8')](_0x5a25('0x9'),_0x5bc02a,'request\x20sent');logger[_0x5a25('0xa')]('ZendeskField,\x20%s,\x20%s,\x20%s',_0x5bc02a,_0x5a25('0xb'),JSON[_0x5a25('0xc')](_0x6a0ebe));if(_0x6a0ebe[_0x5a25('0xd')]){if(_0x6a0ebe[_0x5a25('0xd')][_0x5a25('0xe')]===0x1f4){logger['error']('ZendeskField,\x20%s,\x20%s',_0x5bc02a,_0x6a0ebe[_0x5a25('0xd')][_0x5a25('0xf')]);return _0x304bc6(_0x6a0ebe[_0x5a25('0xd')][_0x5a25('0xf')]);}logger[_0x5a25('0xd')]('ZendeskField,\x20%s,\x20%s',_0x5bc02a,_0x6a0ebe[_0x5a25('0xd')][_0x5a25('0xf')]);return _0x171236(_0x6a0ebe[_0x5a25('0xd')][_0x5a25('0xf')]);}else{logger['info'](_0x5a25('0x9'),_0x5bc02a,_0x5a25('0xb'));_0x171236(_0x6a0ebe['result'][_0x5a25('0xf')]);}})[_0x5a25('0x10')](function(_0x1022d6){logger[_0x5a25('0xd')](_0x5a25('0x9'),_0x5bc02a,_0x1022d6);_0x304bc6(_0x1022d6);});});}
\ No newline at end of file