Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / api / cannedAnswer / cannedAnswer.rpc.js
index fb19dcf..6f988d4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x823f=['../../config/environment','jayson/promise','client','request','CannedAnswer,\x20%s,\x20%s','CannedAnswer,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x38e447,_0x2c399f){var _0x32b8f7=function(_0x59601f){while(--_0x59601f){_0x38e447['push'](_0x38e447['shift']());}};_0x32b8f7(++_0x2c399f);}(_0x823f,0x9f));var _0xf823=function(_0x19ef2b,_0x354f66){_0x19ef2b=_0x19ef2b-0x0;var _0x4df537=_0x823f[_0x19ef2b];return _0x4df537;};'use strict';var _=require(_0xf823('0x0'));var util=require(_0xf823('0x1'));var moment=require(_0xf823('0x2'));var BPromise=require(_0xf823('0x3'));var rs=require(_0xf823('0x4'));var fs=require('fs');var Redis=require(_0xf823('0x5'));var db=require(_0xf823('0x6'))['db'];var utils=require(_0xf823('0x7'));var logger=require(_0xf823('0x8'))('rpc');var config=require(_0xf823('0x9'));var jayson=require(_0xf823('0xa'));var client=jayson[_0xf823('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5507cd,_0x574348,_0x138856){return new BPromise(function(_0x3750a3,_0x5ce626){return client[_0xf823('0xc')](_0x5507cd,_0x138856)['then'](function(_0x33bef0){logger['info'](_0xf823('0xd'),_0x574348,'request\x20sent');logger['debug'](_0xf823('0xe'),_0x574348,_0xf823('0xf'),JSON['stringify'](_0x33bef0));if(_0x33bef0[_0xf823('0x10')]){if(_0x33bef0['error']['code']===0x1f4){logger[_0xf823('0x10')](_0xf823('0xd'),_0x574348,_0x33bef0[_0xf823('0x10')][_0xf823('0x11')]);return _0x5ce626(_0x33bef0[_0xf823('0x10')]['message']);}logger[_0xf823('0x10')](_0xf823('0xd'),_0x574348,_0x33bef0[_0xf823('0x10')][_0xf823('0x11')]);return _0x3750a3(_0x33bef0['error']['message']);}else{logger[_0xf823('0x12')](_0xf823('0xd'),_0x574348,_0xf823('0xf'));_0x3750a3(_0x33bef0[_0xf823('0x13')][_0xf823('0x11')]);}})[_0xf823('0x14')](function(_0x543f39){logger[_0xf823('0x10')](_0xf823('0xd'),_0x574348,_0x543f39);_0x5ce626(_0x543f39);});});}
\ No newline at end of file
+var _0xf5b4=['bluebird','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','then','info','CannedAnswer,\x20%s,\x20%s','CannedAnswer,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','util'];(function(_0x5732bc,_0x317fb6){var _0x178740=function(_0x1ae234){while(--_0x1ae234){_0x5732bc['push'](_0x5732bc['shift']());}};_0x178740(++_0x317fb6);}(_0xf5b4,0x179));var _0x4f5b=function(_0x1878db,_0x18d9f6){_0x1878db=_0x1878db-0x0;var _0x1ae242=_0xf5b4[_0x1878db];return _0x1ae242;};'use strict';var _=require('lodash');var util=require(_0x4f5b('0x0'));var moment=require('moment');var BPromise=require(_0x4f5b('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4f5b('0x2'));var db=require(_0x4f5b('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x4f5b('0x4'))(_0x4f5b('0x5'));var config=require('../../config/environment');var jayson=require(_0x4f5b('0x6'));var client=jayson[_0x4f5b('0x7')][_0x4f5b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x190edb,_0x4c0f54,_0x41112a){return new BPromise(function(_0x4ad9d3,_0x445f80){return client['request'](_0x190edb,_0x41112a)[_0x4f5b('0x9')](function(_0x3d4183){logger[_0x4f5b('0xa')](_0x4f5b('0xb'),_0x4c0f54,'request\x20sent');logger['debug'](_0x4f5b('0xc'),_0x4c0f54,_0x4f5b('0xd'),JSON[_0x4f5b('0xe')](_0x3d4183));if(_0x3d4183[_0x4f5b('0xf')]){if(_0x3d4183[_0x4f5b('0xf')]['code']===0x1f4){logger[_0x4f5b('0xf')]('CannedAnswer,\x20%s,\x20%s',_0x4c0f54,_0x3d4183[_0x4f5b('0xf')][_0x4f5b('0x10')]);return _0x445f80(_0x3d4183[_0x4f5b('0xf')]['message']);}logger[_0x4f5b('0xf')]('CannedAnswer,\x20%s,\x20%s',_0x4c0f54,_0x3d4183['error'][_0x4f5b('0x10')]);return _0x4ad9d3(_0x3d4183[_0x4f5b('0xf')][_0x4f5b('0x10')]);}else{logger[_0x4f5b('0xa')](_0x4f5b('0xb'),_0x4c0f54,'request\x20sent');_0x4ad9d3(_0x3d4183[_0x4f5b('0x11')][_0x4f5b('0x10')]);}})['catch'](function(_0x500ca3){logger[_0x4f5b('0xf')](_0x4f5b('0xb'),_0x4c0f54,_0x500ca3);_0x445f80(_0x500ca3);});});}
\ No newline at end of file