Built motion from commit 953226e6.|2.6.32
[motion2.git] / server / api / voiceTransferReport / voiceTransferReport.rpc.js
index 8ab6585..14d1f57 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x08f9=['message','info','catch','VoiceTransferReport','create','body','options','raw','CreateVoiceTransferReport','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','request','then','VoiceTransferReport,\x20%s,\x20%s','request\x20sent','debug','VoiceTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x278b11,_0xf762a5){var _0x14235c=function(_0x3bc57e){while(--_0x3bc57e){_0x278b11['push'](_0x278b11['shift']());}};_0x14235c(++_0xf762a5);}(_0x08f9,0x191));var _0x908f=function(_0x5caa38,_0x7c4a6c){_0x5caa38=_0x5caa38-0x0;var _0x5b3b8d=_0x08f9[_0x5caa38];return _0x5b3b8d;};'use strict';var _=require(_0x908f('0x0'));var util=require(_0x908f('0x1'));var moment=require('moment');var BPromise=require(_0x908f('0x2'));var rs=require(_0x908f('0x3'));var fs=require('fs');var Redis=require(_0x908f('0x4'));var db=require(_0x908f('0x5'))['db'];var utils=require(_0x908f('0x6'));var logger=require('../../config/logger')(_0x908f('0x7'));var config=require('../../config/environment');var jayson=require(_0x908f('0x8'));var client=jayson[_0x908f('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5cd744,_0x32aa99,_0x47e8d8){return new BPromise(function(_0x31f11c,_0x20185e){return client[_0x908f('0xa')](_0x5cd744,_0x47e8d8)[_0x908f('0xb')](function(_0x1b9913){logger['info'](_0x908f('0xc'),_0x32aa99,_0x908f('0xd'));logger[_0x908f('0xe')](_0x908f('0xf'),_0x32aa99,_0x908f('0xd'),JSON[_0x908f('0x10')](_0x1b9913));if(_0x1b9913[_0x908f('0x11')]){if(_0x1b9913[_0x908f('0x11')][_0x908f('0x12')]===0x1f4){logger[_0x908f('0x11')](_0x908f('0xc'),_0x32aa99,_0x1b9913[_0x908f('0x11')]['message']);return _0x20185e(_0x1b9913[_0x908f('0x11')][_0x908f('0x13')]);}logger[_0x908f('0x11')](_0x908f('0xc'),_0x32aa99,_0x1b9913[_0x908f('0x11')]['message']);return _0x31f11c(_0x1b9913[_0x908f('0x11')]['message']);}else{logger[_0x908f('0x14')]('VoiceTransferReport,\x20%s,\x20%s',_0x32aa99,_0x908f('0xd'));_0x31f11c(_0x1b9913['result'][_0x908f('0x13')]);}})[_0x908f('0x15')](function(_0x32f7ca){logger[_0x908f('0x11')]('VoiceTransferReport,\x20%s,\x20%s',_0x32aa99,_0x32f7ca);_0x20185e(_0x32f7ca);});});}exports['CreateVoiceTransferReport']=function(_0x61a4b4){var _0x12e51d=this;return new Promise(function(_0x278127,_0xd04871){return db[_0x908f('0x16')][_0x908f('0x17')](_0x61a4b4[_0x908f('0x18')],{'raw':_0x61a4b4[_0x908f('0x19')]?_0x61a4b4[_0x908f('0x19')][_0x908f('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x1797cd){logger['info']('CreateVoiceTransferReport',_0x61a4b4);logger[_0x908f('0xe')]('CreateVoiceTransferReport',_0x61a4b4,JSON[_0x908f('0x10')](_0x1797cd));_0x278127(_0x1797cd);})[_0x908f('0x15')](function(_0x59c436){logger[_0x908f('0x11')](_0x908f('0x1b'),_0x59c436[_0x908f('0x13')],_0x61a4b4);_0xd04871(_0x12e51d[_0x908f('0x11')](0x1f4,_0x59c436[_0x908f('0x13')]));});});};
\ No newline at end of file
+var _0x8693=['result','catch','CreateVoiceTransferReport','VoiceTransferReport','body','options','raw','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','../../config/environment','http','request','then','info','VoiceTransferReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message'];(function(_0x4768c6,_0xff55d6){var _0x41b439=function(_0x9b758c){while(--_0x9b758c){_0x4768c6['push'](_0x4768c6['shift']());}};_0x41b439(++_0xff55d6);}(_0x8693,0x18d));var _0x3869=function(_0x542823,_0x1cf8b2){_0x542823=_0x542823-0x0;var _0x385050=_0x8693[_0x542823];return _0x385050;};'use strict';var _=require(_0x3869('0x0'));var util=require(_0x3869('0x1'));var moment=require(_0x3869('0x2'));var BPromise=require(_0x3869('0x3'));var rs=require(_0x3869('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x3869('0x5'));var logger=require(_0x3869('0x6'))('rpc');var config=require(_0x3869('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x3869('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x133ac2,_0x4f48ab,_0x2a5c3d){return new BPromise(function(_0x46cb4b,_0x2b4143){return client[_0x3869('0x9')](_0x133ac2,_0x2a5c3d)[_0x3869('0xa')](function(_0x5ee9d0){logger[_0x3869('0xb')](_0x3869('0xc'),_0x4f48ab,_0x3869('0xd'));logger[_0x3869('0xe')]('VoiceTransferReport,\x20%s,\x20%s,\x20%s',_0x4f48ab,'request\x20sent',JSON[_0x3869('0xf')](_0x5ee9d0));if(_0x5ee9d0[_0x3869('0x10')]){if(_0x5ee9d0[_0x3869('0x10')][_0x3869('0x11')]===0x1f4){logger[_0x3869('0x10')]('VoiceTransferReport,\x20%s,\x20%s',_0x4f48ab,_0x5ee9d0['error'][_0x3869('0x12')]);return _0x2b4143(_0x5ee9d0[_0x3869('0x10')][_0x3869('0x12')]);}logger['error'](_0x3869('0xc'),_0x4f48ab,_0x5ee9d0[_0x3869('0x10')]['message']);return _0x46cb4b(_0x5ee9d0[_0x3869('0x10')][_0x3869('0x12')]);}else{logger[_0x3869('0xb')](_0x3869('0xc'),_0x4f48ab,_0x3869('0xd'));_0x46cb4b(_0x5ee9d0[_0x3869('0x13')][_0x3869('0x12')]);}})[_0x3869('0x14')](function(_0x3b496a){logger[_0x3869('0x10')](_0x3869('0xc'),_0x4f48ab,_0x3b496a);_0x2b4143(_0x3b496a);});});}exports[_0x3869('0x15')]=function(_0x3c3295){var _0xa4f4c0=this;return new Promise(function(_0xa92dff,_0x1dcfe1){return db[_0x3869('0x16')]['create'](_0x3c3295[_0x3869('0x17')],{'raw':_0x3c3295[_0x3869('0x18')]?_0x3c3295[_0x3869('0x18')][_0x3869('0x19')]===undefined?!![]:![]:!![]})[_0x3869('0xa')](function(_0x23ed08){logger['info'](_0x3869('0x15'),_0x3c3295);logger[_0x3869('0xe')](_0x3869('0x15'),_0x3c3295,JSON[_0x3869('0xf')](_0x23ed08));_0xa92dff(_0x23ed08);})[_0x3869('0x14')](function(_0x4e84cb){logger['error'](_0x3869('0x15'),_0x4e84cb[_0x3869('0x12')],_0x3c3295);_0x1dcfe1(_0xa4f4c0['error'](0x1f4,_0x4e84cb['message']));});});};
\ No newline at end of file