Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / intFreshdeskField / intFreshdeskField.rpc.js
index c6049bd..488d484 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4bc6=['randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','FreshdeskField,\x20%s,\x20%s,\x20%s','stringify','error','FreshdeskField,\x20%s,\x20%s','message','result','catch','lodash','moment','bluebird'];(function(_0x48fa41,_0x511025){var _0x1eaa99=function(_0x549e85){while(--_0x549e85){_0x48fa41['push'](_0x48fa41['shift']());}};_0x1eaa99(++_0x511025);}(_0x4bc6,0xe3));var _0x64bc=function(_0x1deb03,_0xd05ad8){_0x1deb03=_0x1deb03-0x0;var _0x189fe7=_0x4bc6[_0x1deb03];return _0x189fe7;};'use strict';var _=require(_0x64bc('0x0'));var util=require('util');var moment=require(_0x64bc('0x1'));var BPromise=require(_0x64bc('0x2'));var rs=require(_0x64bc('0x3'));var fs=require('fs');var Redis=require(_0x64bc('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x64bc('0x5'));var logger=require(_0x64bc('0x6'))(_0x64bc('0x7'));var config=require(_0x64bc('0x8'));var jayson=require(_0x64bc('0x9'));var client=jayson[_0x64bc('0xa')][_0x64bc('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5115f7,_0x2621d9,_0xbe1233){return new BPromise(function(_0x55ad22,_0x4687a6){return client[_0x64bc('0xc')](_0x5115f7,_0xbe1233)[_0x64bc('0xd')](function(_0x314d84){logger[_0x64bc('0xe')]('FreshdeskField,\x20%s,\x20%s',_0x2621d9,_0x64bc('0xf'));logger['debug'](_0x64bc('0x10'),_0x2621d9,_0x64bc('0xf'),JSON[_0x64bc('0x11')](_0x314d84));if(_0x314d84[_0x64bc('0x12')]){if(_0x314d84[_0x64bc('0x12')]['code']===0x1f4){logger[_0x64bc('0x12')](_0x64bc('0x13'),_0x2621d9,_0x314d84[_0x64bc('0x12')][_0x64bc('0x14')]);return _0x4687a6(_0x314d84[_0x64bc('0x12')][_0x64bc('0x14')]);}logger['error'](_0x64bc('0x13'),_0x2621d9,_0x314d84[_0x64bc('0x12')][_0x64bc('0x14')]);return _0x55ad22(_0x314d84['error'][_0x64bc('0x14')]);}else{logger[_0x64bc('0xe')](_0x64bc('0x13'),_0x2621d9,'request\x20sent');_0x55ad22(_0x314d84[_0x64bc('0x15')][_0x64bc('0x14')]);}})[_0x64bc('0x16')](function(_0x424851){logger[_0x64bc('0x12')](_0x64bc('0x13'),_0x2621d9,_0x424851);_0x4687a6(_0x424851);});});}
\ No newline at end of file
+var _0x48da=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','FreshdeskField,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message'];(function(_0x5f49c0,_0x27a1b4){var _0x5ab653=function(_0x4de962){while(--_0x4de962){_0x5f49c0['push'](_0x5f49c0['shift']());}};_0x5ab653(++_0x27a1b4);}(_0x48da,0x1ce));var _0xa48d=function(_0x41bdd0,_0x286746){_0x41bdd0=_0x41bdd0-0x0;var _0x31b137=_0x48da[_0x41bdd0];return _0x31b137;};'use strict';var _=require(_0xa48d('0x0'));var util=require(_0xa48d('0x1'));var moment=require(_0xa48d('0x2'));var BPromise=require(_0xa48d('0x3'));var rs=require(_0xa48d('0x4'));var fs=require('fs');var Redis=require(_0xa48d('0x5'));var db=require(_0xa48d('0x6'))['db'];var utils=require(_0xa48d('0x7'));var logger=require(_0xa48d('0x8'))(_0xa48d('0x9'));var config=require(_0xa48d('0xa'));var jayson=require('jayson/promise');var client=jayson[_0xa48d('0xb')][_0xa48d('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3a798e,_0xe781ad,_0xa6d91c){return new BPromise(function(_0x126ca5,_0x1856f8){return client[_0xa48d('0xd')](_0x3a798e,_0xa6d91c)['then'](function(_0x5a8062){logger['info'](_0xa48d('0xe'),_0xe781ad,'request\x20sent');logger[_0xa48d('0xf')]('FreshdeskField,\x20%s,\x20%s,\x20%s',_0xe781ad,_0xa48d('0x10'),JSON[_0xa48d('0x11')](_0x5a8062));if(_0x5a8062[_0xa48d('0x12')]){if(_0x5a8062[_0xa48d('0x12')][_0xa48d('0x13')]===0x1f4){logger[_0xa48d('0x12')]('FreshdeskField,\x20%s,\x20%s',_0xe781ad,_0x5a8062[_0xa48d('0x12')]['message']);return _0x1856f8(_0x5a8062[_0xa48d('0x12')][_0xa48d('0x14')]);}logger[_0xa48d('0x12')](_0xa48d('0xe'),_0xe781ad,_0x5a8062[_0xa48d('0x12')][_0xa48d('0x14')]);return _0x126ca5(_0x5a8062[_0xa48d('0x12')]['message']);}else{logger['info'](_0xa48d('0xe'),_0xe781ad,_0xa48d('0x10'));_0x126ca5(_0x5a8062['result'][_0xa48d('0x14')]);}})['catch'](function(_0x5ea156){logger[_0xa48d('0x12')](_0xa48d('0xe'),_0xe781ad,_0x5ea156);_0x1856f8(_0x5ea156);});});}
\ No newline at end of file