Built motion from commit 953226e6.|2.6.32
[motion2.git] / server / api / voiceDialReport / voiceDialReport.rpc.js
index a456637..14b2bb2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa388=['CreateVoiceDialReport','VoiceDialReport','create','body','options','raw','UpdateVoiceDialReport','update','where','attributes','limit','then','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','info','VoiceDialReport,\x20%s,\x20%s','request\x20sent','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xa388,0x1da));var _0x8a38=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa388[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0x8a38('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x8a38('0x1'));var fs=require('fs');var Redis=require(_0x8a38('0x2'));var db=require(_0x8a38('0x3'))['db'];var utils=require(_0x8a38('0x4'));var logger=require(_0x8a38('0x5'))(_0x8a38('0x6'));var config=require(_0x8a38('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x8a38('0x8')][_0x8a38('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x222519,_0x333efd,_0x223f32){return new BPromise(function(_0xc42daf,_0x5f3fb3){return client[_0x8a38('0xa')](_0x222519,_0x223f32)['then'](function(_0x29bad9){logger[_0x8a38('0xb')](_0x8a38('0xc'),_0x333efd,_0x8a38('0xd'));logger[_0x8a38('0xe')](_0x8a38('0xf'),_0x333efd,_0x8a38('0xd'),JSON[_0x8a38('0x10')](_0x29bad9));if(_0x29bad9['error']){if(_0x29bad9[_0x8a38('0x11')][_0x8a38('0x12')]===0x1f4){logger['error'](_0x8a38('0xc'),_0x333efd,_0x29bad9['error'][_0x8a38('0x13')]);return _0x5f3fb3(_0x29bad9[_0x8a38('0x11')][_0x8a38('0x13')]);}logger[_0x8a38('0x11')](_0x8a38('0xc'),_0x333efd,_0x29bad9[_0x8a38('0x11')]['message']);return _0xc42daf(_0x29bad9[_0x8a38('0x11')][_0x8a38('0x13')]);}else{logger[_0x8a38('0xb')](_0x8a38('0xc'),_0x333efd,_0x8a38('0xd'));_0xc42daf(_0x29bad9['result'][_0x8a38('0x13')]);}})[_0x8a38('0x14')](function(_0x1badcb){logger[_0x8a38('0x11')](_0x8a38('0xc'),_0x333efd,_0x1badcb);_0x5f3fb3(_0x1badcb);});});}exports[_0x8a38('0x15')]=function(_0x37110d){var _0x45304e=this;return new Promise(function(_0x225f7b,_0x5e42d8){return db[_0x8a38('0x16')][_0x8a38('0x17')](_0x37110d[_0x8a38('0x18')],{'raw':_0x37110d[_0x8a38('0x19')]?_0x37110d[_0x8a38('0x19')][_0x8a38('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x24ccff){logger[_0x8a38('0xb')](_0x8a38('0x15'),_0x37110d);logger['debug'](_0x8a38('0x15'),_0x37110d,JSON[_0x8a38('0x10')](_0x24ccff));_0x225f7b(_0x24ccff);})[_0x8a38('0x14')](function(_0xee381){logger[_0x8a38('0x11')](_0x8a38('0x15'),_0xee381[_0x8a38('0x13')],_0x37110d);_0x5e42d8(_0x45304e['error'](0x1f4,_0xee381[_0x8a38('0x13')]));});});};exports[_0x8a38('0x1b')]=function(_0x102aaa){var _0x6431cf=this;return new Promise(function(_0x5cf4bf,_0x1cb562){return db['VoiceDialReport'][_0x8a38('0x1c')](_0x102aaa[_0x8a38('0x18')],{'raw':_0x102aaa[_0x8a38('0x19')]?_0x102aaa['options'][_0x8a38('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x102aaa['options']?_0x102aaa[_0x8a38('0x19')][_0x8a38('0x1d')]||null:null,'attributes':_0x102aaa[_0x8a38('0x19')]?_0x102aaa[_0x8a38('0x19')][_0x8a38('0x1e')]||null:null,'limit':_0x102aaa['options']?_0x102aaa['options'][_0x8a38('0x1f')]||null:null})[_0x8a38('0x20')](function(_0x29905f){logger[_0x8a38('0xb')]('UpdateVoiceDialReport',_0x102aaa);logger['debug']('UpdateVoiceDialReport',_0x102aaa,JSON[_0x8a38('0x10')](_0x29905f));_0x5cf4bf(_0x29905f);})['catch'](function(_0x1b4f5f){logger[_0x8a38('0x11')]('UpdateVoiceDialReport',_0x1b4f5f[_0x8a38('0x13')],_0x102aaa);_0x1cb562(_0x6431cf[_0x8a38('0x11')](0x1f4,_0x1b4f5f['message']));});});};
\ No newline at end of file
+var _0x9ca3=['moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s','stringify','error','VoiceDialReport,\x20%s,\x20%s','message','catch','CreateVoiceDialReport','VoiceDialReport','create','options','raw','body','limit','UpdateVoiceDialReport','util'];(function(_0x43398c,_0xb73e15){var _0x549323=function(_0x6941ab){while(--_0x6941ab){_0x43398c['push'](_0x43398c['shift']());}};_0x549323(++_0xb73e15);}(_0x9ca3,0x1a3));var _0x39ca=function(_0x5144f3,_0x55f3fe){_0x5144f3=_0x5144f3-0x0;var _0x1d1eb1=_0x9ca3[_0x5144f3];return _0x1d1eb1;};'use strict';var _=require('lodash');var util=require(_0x39ca('0x0'));var moment=require(_0x39ca('0x1'));var BPromise=require(_0x39ca('0x2'));var rs=require(_0x39ca('0x3'));var fs=require('fs');var Redis=require(_0x39ca('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x39ca('0x5'));var logger=require(_0x39ca('0x6'))(_0x39ca('0x7'));var config=require(_0x39ca('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x39ca('0x9')][_0x39ca('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3fca37,_0x4fc5f9,_0x1b5c66){return new BPromise(function(_0x54b72a,_0x524cf6){return client[_0x39ca('0xb')](_0x3fca37,_0x1b5c66)[_0x39ca('0xc')](function(_0x2e7f50){logger[_0x39ca('0xd')]('VoiceDialReport,\x20%s,\x20%s',_0x4fc5f9,_0x39ca('0xe'));logger[_0x39ca('0xf')](_0x39ca('0x10'),_0x4fc5f9,_0x39ca('0xe'),JSON[_0x39ca('0x11')](_0x2e7f50));if(_0x2e7f50['error']){if(_0x2e7f50[_0x39ca('0x12')]['code']===0x1f4){logger[_0x39ca('0x12')](_0x39ca('0x13'),_0x4fc5f9,_0x2e7f50['error']['message']);return _0x524cf6(_0x2e7f50[_0x39ca('0x12')][_0x39ca('0x14')]);}logger['error']('VoiceDialReport,\x20%s,\x20%s',_0x4fc5f9,_0x2e7f50[_0x39ca('0x12')][_0x39ca('0x14')]);return _0x54b72a(_0x2e7f50[_0x39ca('0x12')]['message']);}else{logger[_0x39ca('0xd')]('VoiceDialReport,\x20%s,\x20%s',_0x4fc5f9,_0x39ca('0xe'));_0x54b72a(_0x2e7f50['result'][_0x39ca('0x14')]);}})[_0x39ca('0x15')](function(_0x267fc4){logger[_0x39ca('0x12')]('VoiceDialReport,\x20%s,\x20%s',_0x4fc5f9,_0x267fc4);_0x524cf6(_0x267fc4);});});}exports[_0x39ca('0x16')]=function(_0x580601){var _0x26fa81=this;return new Promise(function(_0xd527f6,_0x32d398){return db[_0x39ca('0x17')][_0x39ca('0x18')](_0x580601['body'],{'raw':_0x580601[_0x39ca('0x19')]?_0x580601['options'][_0x39ca('0x1a')]===undefined?!![]:![]:!![]})[_0x39ca('0xc')](function(_0x54b09f){logger[_0x39ca('0xd')](_0x39ca('0x16'),_0x580601);logger['debug'](_0x39ca('0x16'),_0x580601,JSON[_0x39ca('0x11')](_0x54b09f));_0xd527f6(_0x54b09f);})[_0x39ca('0x15')](function(_0x4e1c2f){logger[_0x39ca('0x12')]('CreateVoiceDialReport',_0x4e1c2f[_0x39ca('0x14')],_0x580601);_0x32d398(_0x26fa81[_0x39ca('0x12')](0x1f4,_0x4e1c2f[_0x39ca('0x14')]));});});};exports['UpdateVoiceDialReport']=function(_0xbcfb7c){var _0x60cdb1=this;return new Promise(function(_0x2b766b,_0x11b36e){return db['VoiceDialReport']['update'](_0xbcfb7c[_0x39ca('0x1b')],{'raw':_0xbcfb7c[_0x39ca('0x19')]?_0xbcfb7c[_0x39ca('0x19')][_0x39ca('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xbcfb7c['options']?_0xbcfb7c[_0x39ca('0x19')]['where']||null:null,'attributes':_0xbcfb7c[_0x39ca('0x19')]?_0xbcfb7c['options']['attributes']||null:null,'limit':_0xbcfb7c[_0x39ca('0x19')]?_0xbcfb7c[_0x39ca('0x19')][_0x39ca('0x1c')]||null:null})['then'](function(_0x210d0a){logger['info'](_0x39ca('0x1d'),_0xbcfb7c);logger[_0x39ca('0xf')](_0x39ca('0x1d'),_0xbcfb7c,JSON['stringify'](_0x210d0a));_0x2b766b(_0x210d0a);})[_0x39ca('0x15')](function(_0x5ab0bb){logger['error'](_0x39ca('0x1d'),_0x5ab0bb[_0x39ca('0x14')],_0xbcfb7c);_0x11b36e(_0x60cdb1[_0x39ca('0x12')](0x1f4,_0x5ab0bb[_0x39ca('0x14')]));});});};
\ No newline at end of file