Built motion from commit (unavailable).|2.5.19
[motion2.git] / server / api / cannedAnswer / cannedAnswer.rpc.js
index 883634a..19e4416 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0ace=['error','code','message','result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then','info','CannedAnswer,\x20%s,\x20%s','debug','CannedAnswer,\x20%s,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x334206,_0x5d9ecb){var _0x479fa2=function(_0x550a49){while(--_0x550a49){_0x334206['push'](_0x334206['shift']());}};_0x479fa2(++_0x5d9ecb);}(_0x0ace,0x15e));var _0xe0ac=function(_0x308c00,_0x3cbd67){_0x308c00=_0x308c00-0x0;var _0x2b21b2=_0x0ace[_0x308c00];return _0x2b21b2;};'use strict';var _=require(_0xe0ac('0x0'));var util=require(_0xe0ac('0x1'));var moment=require(_0xe0ac('0x2'));var BPromise=require(_0xe0ac('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe0ac('0x4'))['db'];var utils=require(_0xe0ac('0x5'));var logger=require(_0xe0ac('0x6'))(_0xe0ac('0x7'));var config=require(_0xe0ac('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0xe0ac('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1cd9c0,_0x346188,_0x75439f){return new BPromise(function(_0x31f622,_0x3b86e8){return client[_0xe0ac('0xa')](_0x1cd9c0,_0x75439f)[_0xe0ac('0xb')](function(_0x4c7b84){logger[_0xe0ac('0xc')](_0xe0ac('0xd'),_0x346188,'request\x20sent');logger[_0xe0ac('0xe')](_0xe0ac('0xf'),_0x346188,_0xe0ac('0x10'),JSON[_0xe0ac('0x11')](_0x4c7b84));if(_0x4c7b84[_0xe0ac('0x12')]){if(_0x4c7b84[_0xe0ac('0x12')][_0xe0ac('0x13')]===0x1f4){logger['error'](_0xe0ac('0xd'),_0x346188,_0x4c7b84['error']['message']);return _0x3b86e8(_0x4c7b84[_0xe0ac('0x12')][_0xe0ac('0x14')]);}logger[_0xe0ac('0x12')]('CannedAnswer,\x20%s,\x20%s',_0x346188,_0x4c7b84[_0xe0ac('0x12')]['message']);return _0x31f622(_0x4c7b84[_0xe0ac('0x12')][_0xe0ac('0x14')]);}else{logger['info'](_0xe0ac('0xd'),_0x346188,_0xe0ac('0x10'));_0x31f622(_0x4c7b84[_0xe0ac('0x15')][_0xe0ac('0x14')]);}})[_0xe0ac('0x16')](function(_0x4c568a){logger[_0xe0ac('0x12')](_0xe0ac('0xd'),_0x346188,_0x4c568a);_0x3b86e8(_0x4c568a);});});}
\ No newline at end of file
+var _0x4c4d=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','CannedAnswer,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb'];(function(_0x58d30c,_0x409010){var _0x593255=function(_0x55e0ac){while(--_0x55e0ac){_0x58d30c['push'](_0x58d30c['shift']());}};_0x593255(++_0x409010);}(_0x4c4d,0x14a));var _0xd4c4=function(_0x5368c4,_0x6aef2b){_0x5368c4=_0x5368c4-0x0;var _0xe18947=_0x4c4d[_0x5368c4];return _0xe18947;};'use strict';var _=require(_0xd4c4('0x0'));var util=require(_0xd4c4('0x1'));var moment=require(_0xd4c4('0x2'));var BPromise=require('bluebird');var rs=require(_0xd4c4('0x3'));var fs=require('fs');var Redis=require(_0xd4c4('0x4'));var db=require(_0xd4c4('0x5'))['db'];var utils=require(_0xd4c4('0x6'));var logger=require(_0xd4c4('0x7'))(_0xd4c4('0x8'));var config=require(_0xd4c4('0x9'));var jayson=require(_0xd4c4('0xa'));var client=jayson['client'][_0xd4c4('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5765dd,_0x23c9de,_0xa7c633){return new BPromise(function(_0x4a41aa,_0xb1ed86){return client['request'](_0x5765dd,_0xa7c633)[_0xd4c4('0xc')](function(_0xa083dc){logger[_0xd4c4('0xd')](_0xd4c4('0xe'),_0x23c9de,'request\x20sent');logger['debug']('CannedAnswer,\x20%s,\x20%s,\x20%s',_0x23c9de,_0xd4c4('0xf'),JSON[_0xd4c4('0x10')](_0xa083dc));if(_0xa083dc['error']){if(_0xa083dc['error']['code']===0x1f4){logger[_0xd4c4('0x11')](_0xd4c4('0xe'),_0x23c9de,_0xa083dc[_0xd4c4('0x11')][_0xd4c4('0x12')]);return _0xb1ed86(_0xa083dc[_0xd4c4('0x11')][_0xd4c4('0x12')]);}logger[_0xd4c4('0x11')](_0xd4c4('0xe'),_0x23c9de,_0xa083dc[_0xd4c4('0x11')][_0xd4c4('0x12')]);return _0x4a41aa(_0xa083dc[_0xd4c4('0x11')][_0xd4c4('0x12')]);}else{logger['info'](_0xd4c4('0xe'),_0x23c9de,_0xd4c4('0xf'));_0x4a41aa(_0xa083dc[_0xd4c4('0x13')][_0xd4c4('0x12')]);}})[_0xd4c4('0x14')](function(_0x583ee4){logger[_0xd4c4('0x11')](_0xd4c4('0xe'),_0x23c9de,_0x583ee4);_0xb1ed86(_0x583ee4);});});}
\ No newline at end of file