Built motion from commit (unavailable).|2.5.6
[motion2.git] / server / api / voiceDialReport / voiceDialReport.rpc.js
index bcb5085..c7b5e25 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4a68=['../../config/environment','http','request','info','VoiceDialReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','VoiceDialReport,\x20%s,\x20%s','message','result','catch','CreateVoiceDialReport','create','body','options','raw','then','debug','VoiceDialReport','update','where','attributes','limit','UpdateVoiceDialReport','util','moment','bluebird','randomstring','ioredis','../../config/logger'];(function(_0x2a3dda,_0x24416a){var _0x169117=function(_0x3b35ee){while(--_0x3b35ee){_0x2a3dda['push'](_0x2a3dda['shift']());}};_0x169117(++_0x24416a);}(_0x4a68,0xb4));var _0x84a6=function(_0x18e77d,_0x3ee711){_0x18e77d=_0x18e77d-0x0;var _0x513b54=_0x4a68[_0x18e77d];return _0x513b54;};'use strict';var _=require('lodash');var util=require(_0x84a6('0x0'));var moment=require(_0x84a6('0x1'));var BPromise=require(_0x84a6('0x2'));var rs=require(_0x84a6('0x3'));var fs=require('fs');var Redis=require(_0x84a6('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x84a6('0x5'))('rpc');var config=require(_0x84a6('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0x84a6('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x388e94,_0x31e21b,_0x5b4f71){return new BPromise(function(_0x17b84a,_0x952540){return client[_0x84a6('0x8')](_0x388e94,_0x5b4f71)['then'](function(_0xc5992f){logger[_0x84a6('0x9')]('VoiceDialReport,\x20%s,\x20%s',_0x31e21b,'request\x20sent');logger['debug'](_0x84a6('0xa'),_0x31e21b,_0x84a6('0xb'),JSON[_0x84a6('0xc')](_0xc5992f));if(_0xc5992f[_0x84a6('0xd')]){if(_0xc5992f['error']['code']===0x1f4){logger[_0x84a6('0xd')](_0x84a6('0xe'),_0x31e21b,_0xc5992f[_0x84a6('0xd')][_0x84a6('0xf')]);return _0x952540(_0xc5992f[_0x84a6('0xd')][_0x84a6('0xf')]);}logger[_0x84a6('0xd')](_0x84a6('0xe'),_0x31e21b,_0xc5992f['error']['message']);return _0x17b84a(_0xc5992f[_0x84a6('0xd')][_0x84a6('0xf')]);}else{logger[_0x84a6('0x9')]('VoiceDialReport,\x20%s,\x20%s',_0x31e21b,'request\x20sent');_0x17b84a(_0xc5992f[_0x84a6('0x10')][_0x84a6('0xf')]);}})[_0x84a6('0x11')](function(_0x38d16e){logger[_0x84a6('0xd')](_0x84a6('0xe'),_0x31e21b,_0x38d16e);_0x952540(_0x38d16e);});});}exports[_0x84a6('0x12')]=function(_0x1effdc){var _0xc1e0a6=this;return new Promise(function(_0x2f4221,_0x4369ed){return db['VoiceDialReport'][_0x84a6('0x13')](_0x1effdc[_0x84a6('0x14')],{'raw':_0x1effdc['options']?_0x1effdc[_0x84a6('0x15')][_0x84a6('0x16')]===undefined?!![]:![]:!![]})[_0x84a6('0x17')](function(_0x15ba29){logger['info'](_0x84a6('0x12'),_0x1effdc);logger[_0x84a6('0x18')](_0x84a6('0x12'),_0x1effdc,JSON['stringify'](_0x15ba29));_0x2f4221(_0x15ba29);})[_0x84a6('0x11')](function(_0x2fb6d9){logger['error'](_0x84a6('0x12'),_0x2fb6d9['message'],_0x1effdc);_0x4369ed(_0xc1e0a6[_0x84a6('0xd')](0x1f4,_0x2fb6d9[_0x84a6('0xf')]));});});};exports['UpdateVoiceDialReport']=function(_0x12e614){var _0x141d2e=this;return new Promise(function(_0x1a4165,_0x11b33c){return db[_0x84a6('0x19')][_0x84a6('0x1a')](_0x12e614[_0x84a6('0x14')],{'raw':_0x12e614[_0x84a6('0x15')]?_0x12e614['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x12e614[_0x84a6('0x15')]?_0x12e614['options'][_0x84a6('0x1b')]||null:null,'attributes':_0x12e614['options']?_0x12e614[_0x84a6('0x15')][_0x84a6('0x1c')]||null:null,'limit':_0x12e614[_0x84a6('0x15')]?_0x12e614[_0x84a6('0x15')][_0x84a6('0x1d')]||null:null})[_0x84a6('0x17')](function(_0x210c03){logger[_0x84a6('0x9')](_0x84a6('0x1e'),_0x12e614);logger[_0x84a6('0x18')](_0x84a6('0x1e'),_0x12e614,JSON['stringify'](_0x210c03));_0x1a4165(_0x210c03);})[_0x84a6('0x11')](function(_0x4e2ac6){logger['error'](_0x84a6('0x1e'),_0x4e2ac6[_0x84a6('0xf')],_0x12e614);_0x11b33c(_0x141d2e[_0x84a6('0xd')](0x1f4,_0x4e2ac6['message']));});});};
\ No newline at end of file
+var _0x796c=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','info','VoiceDialReport,\x20%s,\x20%s,\x20%s','error','code','VoiceDialReport,\x20%s,\x20%s','message','request\x20sent','result','catch','CreateVoiceDialReport','VoiceDialReport','body','options','raw','then','stringify','UpdateVoiceDialReport','attributes','limit'];(function(_0x24dfd2,_0x504fac){var _0x3abda1=function(_0x55bc85){while(--_0x55bc85){_0x24dfd2['push'](_0x24dfd2['shift']());}};_0x3abda1(++_0x504fac);}(_0x796c,0x193));var _0xc796=function(_0xc4001c,_0x1bf8f0){_0xc4001c=_0xc4001c-0x0;var _0x49f7bc=_0x796c[_0xc4001c];return _0x49f7bc;};'use strict';var _=require('lodash');var util=require(_0xc796('0x0'));var moment=require(_0xc796('0x1'));var BPromise=require(_0xc796('0x2'));var rs=require(_0xc796('0x3'));var fs=require('fs');var Redis=require(_0xc796('0x4'));var db=require(_0xc796('0x5'))['db'];var utils=require(_0xc796('0x6'));var logger=require(_0xc796('0x7'))(_0xc796('0x8'));var config=require(_0xc796('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0xc796('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x277bbf,_0x5708e2,_0x24d308){return new BPromise(function(_0x2b5b22,_0x595c01){return client[_0xc796('0xb')](_0x277bbf,_0x24d308)['then'](function(_0x389e68){logger[_0xc796('0xc')]('VoiceDialReport,\x20%s,\x20%s',_0x5708e2,'request\x20sent');logger['debug'](_0xc796('0xd'),_0x5708e2,'request\x20sent',JSON['stringify'](_0x389e68));if(_0x389e68[_0xc796('0xe')]){if(_0x389e68[_0xc796('0xe')][_0xc796('0xf')]===0x1f4){logger[_0xc796('0xe')](_0xc796('0x10'),_0x5708e2,_0x389e68[_0xc796('0xe')][_0xc796('0x11')]);return _0x595c01(_0x389e68[_0xc796('0xe')]['message']);}logger[_0xc796('0xe')](_0xc796('0x10'),_0x5708e2,_0x389e68[_0xc796('0xe')][_0xc796('0x11')]);return _0x2b5b22(_0x389e68[_0xc796('0xe')]['message']);}else{logger[_0xc796('0xc')](_0xc796('0x10'),_0x5708e2,_0xc796('0x12'));_0x2b5b22(_0x389e68[_0xc796('0x13')][_0xc796('0x11')]);}})[_0xc796('0x14')](function(_0xb798f3){logger[_0xc796('0xe')](_0xc796('0x10'),_0x5708e2,_0xb798f3);_0x595c01(_0xb798f3);});});}exports[_0xc796('0x15')]=function(_0x235913){var _0x17deb8=this;return new Promise(function(_0x5d61fa,_0x3e8100){return db[_0xc796('0x16')]['create'](_0x235913[_0xc796('0x17')],{'raw':_0x235913[_0xc796('0x18')]?_0x235913[_0xc796('0x18')][_0xc796('0x19')]===undefined?!![]:![]:!![]})[_0xc796('0x1a')](function(_0x1348ed){logger['info']('CreateVoiceDialReport',_0x235913);logger['debug'](_0xc796('0x15'),_0x235913,JSON[_0xc796('0x1b')](_0x1348ed));_0x5d61fa(_0x1348ed);})[_0xc796('0x14')](function(_0x1e7be5){logger[_0xc796('0xe')](_0xc796('0x15'),_0x1e7be5[_0xc796('0x11')],_0x235913);_0x3e8100(_0x17deb8[_0xc796('0xe')](0x1f4,_0x1e7be5[_0xc796('0x11')]));});});};exports[_0xc796('0x1c')]=function(_0x4fbca7){var _0x57cc38=this;return new Promise(function(_0x16652b,_0x3963a2){return db[_0xc796('0x16')]['update'](_0x4fbca7[_0xc796('0x17')],{'raw':_0x4fbca7[_0xc796('0x18')]?_0x4fbca7[_0xc796('0x18')][_0xc796('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4fbca7[_0xc796('0x18')]?_0x4fbca7['options']['where']||null:null,'attributes':_0x4fbca7[_0xc796('0x18')]?_0x4fbca7['options'][_0xc796('0x1d')]||null:null,'limit':_0x4fbca7[_0xc796('0x18')]?_0x4fbca7[_0xc796('0x18')][_0xc796('0x1e')]||null:null})[_0xc796('0x1a')](function(_0xe3b705){logger[_0xc796('0xc')]('UpdateVoiceDialReport',_0x4fbca7);logger['debug'](_0xc796('0x1c'),_0x4fbca7,JSON[_0xc796('0x1b')](_0xe3b705));_0x16652b(_0xe3b705);})[_0xc796('0x14')](function(_0x4e6701){logger[_0xc796('0xe')](_0xc796('0x1c'),_0x4e6701[_0xc796('0x11')],_0x4fbca7);_0x3963a2(_0x57cc38[_0xc796('0xe')](0x1f4,_0x4e6701[_0xc796('0x11')]));});});};
\ No newline at end of file