Built motion from commit (unavailable).|2.5.22
[motion2.git] / server / api / cannedAnswer / cannedAnswer.rpc.js
index cbcbe69..88855bf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd34c=['jayson/promise','request','CannedAnswer,\x20%s,\x20%s','debug','CannedAnswer,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xd34c,0x16d));var _0xcd34=function(_0x53490b,_0x1882fc){_0x53490b=_0x53490b-0x0;var _0x45ec86=_0xd34c[_0x53490b];return _0x45ec86;};'use strict';var _=require(_0xcd34('0x0'));var util=require(_0xcd34('0x1'));var moment=require(_0xcd34('0x2'));var BPromise=require('bluebird');var rs=require(_0xcd34('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xcd34('0x4'))['db'];var utils=require(_0xcd34('0x5'));var logger=require(_0xcd34('0x6'))(_0xcd34('0x7'));var config=require(_0xcd34('0x8'));var jayson=require(_0xcd34('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x16641e,_0x3bcc7c,_0xb083f5){return new BPromise(function(_0x4062e2,_0x2c105d){return client[_0xcd34('0xa')](_0x16641e,_0xb083f5)['then'](function(_0x4e32c8){logger['info'](_0xcd34('0xb'),_0x3bcc7c,'request\x20sent');logger[_0xcd34('0xc')](_0xcd34('0xd'),_0x3bcc7c,_0xcd34('0xe'),JSON[_0xcd34('0xf')](_0x4e32c8));if(_0x4e32c8[_0xcd34('0x10')]){if(_0x4e32c8[_0xcd34('0x10')][_0xcd34('0x11')]===0x1f4){logger[_0xcd34('0x10')](_0xcd34('0xb'),_0x3bcc7c,_0x4e32c8[_0xcd34('0x10')][_0xcd34('0x12')]);return _0x2c105d(_0x4e32c8[_0xcd34('0x10')][_0xcd34('0x12')]);}logger[_0xcd34('0x10')](_0xcd34('0xb'),_0x3bcc7c,_0x4e32c8[_0xcd34('0x10')][_0xcd34('0x12')]);return _0x4062e2(_0x4e32c8['error'][_0xcd34('0x12')]);}else{logger[_0xcd34('0x13')](_0xcd34('0xb'),_0x3bcc7c,_0xcd34('0xe'));_0x4062e2(_0x4e32c8[_0xcd34('0x14')]['message']);}})[_0xcd34('0x15')](function(_0x5e61da){logger[_0xcd34('0x10')](_0xcd34('0xb'),_0x3bcc7c,_0x5e61da);_0x2c105d(_0x5e61da);});});}
\ No newline at end of file
+var _0xa206=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','CannedAnswer,\x20%s,\x20%s,\x20%s','error','code','CannedAnswer,\x20%s,\x20%s','message','util','moment','bluebird'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa206,0x18c));var _0x6a20=function(_0x4d07d9,_0x152e11){_0x4d07d9=_0x4d07d9-0x0;var _0xcc917e=_0xa206[_0x4d07d9];return _0xcc917e;};'use strict';var _=require('lodash');var util=require(_0x6a20('0x0'));var moment=require(_0x6a20('0x1'));var BPromise=require(_0x6a20('0x2'));var rs=require(_0x6a20('0x3'));var fs=require('fs');var Redis=require(_0x6a20('0x4'));var db=require(_0x6a20('0x5'))['db'];var utils=require(_0x6a20('0x6'));var logger=require(_0x6a20('0x7'))(_0x6a20('0x8'));var config=require(_0x6a20('0x9'));var jayson=require(_0x6a20('0xa'));var client=jayson[_0x6a20('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4b55aa,_0x19d259,_0x29d330){return new BPromise(function(_0x3c858d,_0x302de8){return client[_0x6a20('0xc')](_0x4b55aa,_0x29d330)[_0x6a20('0xd')](function(_0x292ec4){logger[_0x6a20('0xe')]('CannedAnswer,\x20%s,\x20%s',_0x19d259,_0x6a20('0xf'));logger['debug'](_0x6a20('0x10'),_0x19d259,_0x6a20('0xf'),JSON['stringify'](_0x292ec4));if(_0x292ec4[_0x6a20('0x11')]){if(_0x292ec4[_0x6a20('0x11')][_0x6a20('0x12')]===0x1f4){logger[_0x6a20('0x11')](_0x6a20('0x13'),_0x19d259,_0x292ec4[_0x6a20('0x11')]['message']);return _0x302de8(_0x292ec4[_0x6a20('0x11')][_0x6a20('0x14')]);}logger[_0x6a20('0x11')](_0x6a20('0x13'),_0x19d259,_0x292ec4[_0x6a20('0x11')][_0x6a20('0x14')]);return _0x3c858d(_0x292ec4['error']['message']);}else{logger['info'](_0x6a20('0x13'),_0x19d259,_0x6a20('0xf'));_0x3c858d(_0x292ec4['result'][_0x6a20('0x14')]);}})['catch'](function(_0x49b2c8){logger[_0x6a20('0x11')](_0x6a20('0x13'),_0x19d259,_0x49b2c8);_0x302de8(_0x49b2c8);});});}
\ No newline at end of file