Built motion from commit (unavailable).|2.3.1
[motion2.git] / server / api / voiceDialReport / voiceDialReport.rpc.js
index 7253198..d4853aa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f1f=['../../config/logger','rpc','../../config/environment','client','http','request','then','info','VoiceDialReport,\x20%s,\x20%s','request\x20sent','VoiceDialReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','VoiceDialReport','body','options','raw','CreateVoiceDialReport','debug','UpdateVoiceDialReport','update','where','attributes','limit','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x3f347c,_0x3a5e41){var _0x706cb4=function(_0x2b8418){while(--_0x2b8418){_0x3f347c['push'](_0x3f347c['shift']());}};_0x706cb4(++_0x3a5e41);}(_0x8f1f,0xe1));var _0xf8f1=function(_0x5499ab,_0x4c1128){_0x5499ab=_0x5499ab-0x0;var _0x344478=_0x8f1f[_0x5499ab];return _0x344478;};'use strict';var _=require(_0xf8f1('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xf8f1('0x1'));var rs=require(_0xf8f1('0x2'));var fs=require('fs');var Redis=require(_0xf8f1('0x3'));var db=require(_0xf8f1('0x4'))['db'];var utils=require(_0xf8f1('0x5'));var logger=require(_0xf8f1('0x6'))(_0xf8f1('0x7'));var config=require(_0xf8f1('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xf8f1('0x9')][_0xf8f1('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x122134,_0x19ccf6,_0x9609e9){return new BPromise(function(_0x4bd078,_0x1ece01){return client[_0xf8f1('0xb')](_0x122134,_0x9609e9)[_0xf8f1('0xc')](function(_0x24e592){logger[_0xf8f1('0xd')](_0xf8f1('0xe'),_0x19ccf6,_0xf8f1('0xf'));logger['debug'](_0xf8f1('0x10'),_0x19ccf6,_0xf8f1('0xf'),JSON[_0xf8f1('0x11')](_0x24e592));if(_0x24e592[_0xf8f1('0x12')]){if(_0x24e592[_0xf8f1('0x12')][_0xf8f1('0x13')]===0x1f4){logger['error'](_0xf8f1('0xe'),_0x19ccf6,_0x24e592[_0xf8f1('0x12')][_0xf8f1('0x14')]);return _0x1ece01(_0x24e592[_0xf8f1('0x12')][_0xf8f1('0x14')]);}logger['error'](_0xf8f1('0xe'),_0x19ccf6,_0x24e592[_0xf8f1('0x12')][_0xf8f1('0x14')]);return _0x4bd078(_0x24e592[_0xf8f1('0x12')][_0xf8f1('0x14')]);}else{logger[_0xf8f1('0xd')](_0xf8f1('0xe'),_0x19ccf6,'request\x20sent');_0x4bd078(_0x24e592[_0xf8f1('0x15')][_0xf8f1('0x14')]);}})['catch'](function(_0x39350e){logger[_0xf8f1('0x12')](_0xf8f1('0xe'),_0x19ccf6,_0x39350e);_0x1ece01(_0x39350e);});});}exports['CreateVoiceDialReport']=function(_0x3bd8ba){var _0x3bcb06=this;return new Promise(function(_0x410299,_0x448f5b){return db[_0xf8f1('0x16')]['create'](_0x3bd8ba[_0xf8f1('0x17')],{'raw':_0x3bd8ba['options']?_0x3bd8ba[_0xf8f1('0x18')][_0xf8f1('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x3aaa1c){logger[_0xf8f1('0xd')](_0xf8f1('0x1a'),_0x3bd8ba);logger[_0xf8f1('0x1b')](_0xf8f1('0x1a'),_0x3bd8ba,JSON[_0xf8f1('0x11')](_0x3aaa1c));_0x410299(_0x3aaa1c);})['catch'](function(_0x23cf7f){logger['error'](_0xf8f1('0x1a'),_0x23cf7f[_0xf8f1('0x14')],_0x3bd8ba);_0x448f5b(_0x3bcb06[_0xf8f1('0x12')](0x1f4,_0x23cf7f[_0xf8f1('0x14')]));});});};exports[_0xf8f1('0x1c')]=function(_0x842ecb){var _0x29b0f7=this;return new Promise(function(_0x565dd8,_0x526f73){return db[_0xf8f1('0x16')][_0xf8f1('0x1d')](_0x842ecb['body'],{'raw':_0x842ecb[_0xf8f1('0x18')]?_0x842ecb[_0xf8f1('0x18')][_0xf8f1('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x842ecb[_0xf8f1('0x18')]?_0x842ecb[_0xf8f1('0x18')][_0xf8f1('0x1e')]||null:null,'attributes':_0x842ecb[_0xf8f1('0x18')]?_0x842ecb['options'][_0xf8f1('0x1f')]||null:null,'limit':_0x842ecb['options']?_0x842ecb[_0xf8f1('0x18')][_0xf8f1('0x20')]||null:null})[_0xf8f1('0xc')](function(_0x5e4755){logger[_0xf8f1('0xd')](_0xf8f1('0x1c'),_0x842ecb);logger[_0xf8f1('0x1b')]('UpdateVoiceDialReport',_0x842ecb,JSON['stringify'](_0x5e4755));_0x565dd8(_0x5e4755);})['catch'](function(_0x2e26a0){logger[_0xf8f1('0x12')](_0xf8f1('0x1c'),_0x2e26a0[_0xf8f1('0x14')],_0x842ecb);_0x526f73(_0x29b0f7['error'](0x1f4,_0x2e26a0[_0xf8f1('0x14')]));});});};
\ No newline at end of file
+var _0x59ce=['update','where','attributes','limit','UpdateVoiceDialReport','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','VoiceDialReport,\x20%s,\x20%s','request\x20sent','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateVoiceDialReport','create','body','options','raw','VoiceDialReport'];(function(_0xc7ade3,_0x1e46c3){var _0x198d52=function(_0x17085e){while(--_0x17085e){_0xc7ade3['push'](_0xc7ade3['shift']());}};_0x198d52(++_0x1e46c3);}(_0x59ce,0x92));var _0xe59c=function(_0x1f8b8b,_0x51a891){_0x1f8b8b=_0x1f8b8b-0x0;var _0x2aaa1e=_0x59ce[_0x1f8b8b];return _0x2aaa1e;};'use strict';var _=require(_0xe59c('0x0'));var util=require(_0xe59c('0x1'));var moment=require(_0xe59c('0x2'));var BPromise=require('bluebird');var rs=require(_0xe59c('0x3'));var fs=require('fs');var Redis=require(_0xe59c('0x4'));var db=require(_0xe59c('0x5'))['db'];var utils=require(_0xe59c('0x6'));var logger=require(_0xe59c('0x7'))(_0xe59c('0x8'));var config=require(_0xe59c('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xe59c('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x534601,_0x4f07e9,_0x2c1d11){return new BPromise(function(_0x101a79,_0x206753){return client[_0xe59c('0xb')](_0x534601,_0x2c1d11)[_0xe59c('0xc')](function(_0x3981be){logger[_0xe59c('0xd')](_0xe59c('0xe'),_0x4f07e9,_0xe59c('0xf'));logger[_0xe59c('0x10')](_0xe59c('0x11'),_0x4f07e9,_0xe59c('0xf'),JSON[_0xe59c('0x12')](_0x3981be));if(_0x3981be[_0xe59c('0x13')]){if(_0x3981be[_0xe59c('0x13')][_0xe59c('0x14')]===0x1f4){logger[_0xe59c('0x13')](_0xe59c('0xe'),_0x4f07e9,_0x3981be['error'][_0xe59c('0x15')]);return _0x206753(_0x3981be[_0xe59c('0x13')][_0xe59c('0x15')]);}logger[_0xe59c('0x13')]('VoiceDialReport,\x20%s,\x20%s',_0x4f07e9,_0x3981be['error'][_0xe59c('0x15')]);return _0x101a79(_0x3981be[_0xe59c('0x13')][_0xe59c('0x15')]);}else{logger[_0xe59c('0xd')](_0xe59c('0xe'),_0x4f07e9,'request\x20sent');_0x101a79(_0x3981be[_0xe59c('0x16')]['message']);}})['catch'](function(_0xee38fc){logger[_0xe59c('0x13')]('VoiceDialReport,\x20%s,\x20%s',_0x4f07e9,_0xee38fc);_0x206753(_0xee38fc);});});}exports[_0xe59c('0x17')]=function(_0x38f4b0){var _0x32bfd7=this;return new Promise(function(_0x529c0d,_0xe9f0a1){return db['VoiceDialReport'][_0xe59c('0x18')](_0x38f4b0[_0xe59c('0x19')],{'raw':_0x38f4b0[_0xe59c('0x1a')]?_0x38f4b0['options'][_0xe59c('0x1b')]===undefined?!![]:![]:!![]})[_0xe59c('0xc')](function(_0x28a8da){logger[_0xe59c('0xd')](_0xe59c('0x17'),_0x38f4b0);logger[_0xe59c('0x10')](_0xe59c('0x17'),_0x38f4b0,JSON[_0xe59c('0x12')](_0x28a8da));_0x529c0d(_0x28a8da);})['catch'](function(_0x1c9170){logger[_0xe59c('0x13')](_0xe59c('0x17'),_0x1c9170[_0xe59c('0x15')],_0x38f4b0);_0xe9f0a1(_0x32bfd7[_0xe59c('0x13')](0x1f4,_0x1c9170[_0xe59c('0x15')]));});});};exports['UpdateVoiceDialReport']=function(_0x4d3605){var _0x1f9766=this;return new Promise(function(_0x923e8a,_0x481c52){return db[_0xe59c('0x1c')][_0xe59c('0x1d')](_0x4d3605['body'],{'raw':_0x4d3605['options']?_0x4d3605[_0xe59c('0x1a')][_0xe59c('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4d3605[_0xe59c('0x1a')]?_0x4d3605[_0xe59c('0x1a')][_0xe59c('0x1e')]||null:null,'attributes':_0x4d3605[_0xe59c('0x1a')]?_0x4d3605[_0xe59c('0x1a')][_0xe59c('0x1f')]||null:null,'limit':_0x4d3605[_0xe59c('0x1a')]?_0x4d3605[_0xe59c('0x1a')][_0xe59c('0x20')]||null:null})[_0xe59c('0xc')](function(_0x2f844a){logger['info'](_0xe59c('0x21'),_0x4d3605);logger[_0xe59c('0x10')](_0xe59c('0x21'),_0x4d3605,JSON[_0xe59c('0x12')](_0x2f844a));_0x923e8a(_0x2f844a);})[_0xe59c('0x22')](function(_0x480ed9){logger[_0xe59c('0x13')](_0xe59c('0x21'),_0x480ed9[_0xe59c('0x15')],_0x4d3605);_0x481c52(_0x1f9766[_0xe59c('0x13')](0x1f4,_0x480ed9['message']));});});};
\ No newline at end of file