Built motion from commit (unavailable).|2.5.14
[motion2.git] / server / api / voiceDialReport / voiceDialReport.rpc.js
index 5ac21d2..6ffd40b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0f73=['../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','request','then','info','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','VoiceDialReport,\x20%s,\x20%s','message','result','catch','CreateVoiceDialReport','VoiceDialReport','create','body','options','raw','UpdateVoiceDialReport','update','where','attributes','limit','lodash','util','moment','ioredis'];(function(_0x17b6e3,_0x4522ed){var _0x3906f3=function(_0x430f87){while(--_0x430f87){_0x17b6e3['push'](_0x17b6e3['shift']());}};_0x3906f3(++_0x4522ed);}(_0x0f73,0x146));var _0x30f7=function(_0x299747,_0x3bb137){_0x299747=_0x299747-0x0;var _0x18939a=_0x0f73[_0x299747];return _0x18939a;};'use strict';var _=require(_0x30f7('0x0'));var util=require(_0x30f7('0x1'));var moment=require(_0x30f7('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x30f7('0x3'));var db=require(_0x30f7('0x4'))['db'];var utils=require(_0x30f7('0x5'));var logger=require(_0x30f7('0x6'))(_0x30f7('0x7'));var config=require('../../config/environment');var jayson=require(_0x30f7('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x38ad1d,_0x1c90cb,_0x2de5e7){return new BPromise(function(_0x7e377e,_0x5c5cf3){return client[_0x30f7('0x9')](_0x38ad1d,_0x2de5e7)[_0x30f7('0xa')](function(_0x5eedb2){logger[_0x30f7('0xb')]('VoiceDialReport,\x20%s,\x20%s',_0x1c90cb,'request\x20sent');logger[_0x30f7('0xc')](_0x30f7('0xd'),_0x1c90cb,_0x30f7('0xe'),JSON[_0x30f7('0xf')](_0x5eedb2));if(_0x5eedb2['error']){if(_0x5eedb2[_0x30f7('0x10')][_0x30f7('0x11')]===0x1f4){logger['error'](_0x30f7('0x12'),_0x1c90cb,_0x5eedb2[_0x30f7('0x10')][_0x30f7('0x13')]);return _0x5c5cf3(_0x5eedb2['error'][_0x30f7('0x13')]);}logger[_0x30f7('0x10')]('VoiceDialReport,\x20%s,\x20%s',_0x1c90cb,_0x5eedb2[_0x30f7('0x10')][_0x30f7('0x13')]);return _0x7e377e(_0x5eedb2[_0x30f7('0x10')][_0x30f7('0x13')]);}else{logger[_0x30f7('0xb')]('VoiceDialReport,\x20%s,\x20%s',_0x1c90cb,'request\x20sent');_0x7e377e(_0x5eedb2[_0x30f7('0x14')][_0x30f7('0x13')]);}})[_0x30f7('0x15')](function(_0x1a5565){logger['error'](_0x30f7('0x12'),_0x1c90cb,_0x1a5565);_0x5c5cf3(_0x1a5565);});});}exports[_0x30f7('0x16')]=function(_0x1efb71){var _0x1083e3=this;return new Promise(function(_0x1e7777,_0x21f3d1){return db[_0x30f7('0x17')][_0x30f7('0x18')](_0x1efb71[_0x30f7('0x19')],{'raw':_0x1efb71['options']?_0x1efb71[_0x30f7('0x1a')][_0x30f7('0x1b')]===undefined?!![]:![]:!![]})[_0x30f7('0xa')](function(_0x12cdf1){logger[_0x30f7('0xb')](_0x30f7('0x16'),_0x1efb71);logger['debug'](_0x30f7('0x16'),_0x1efb71,JSON[_0x30f7('0xf')](_0x12cdf1));_0x1e7777(_0x12cdf1);})['catch'](function(_0x570d52){logger[_0x30f7('0x10')]('CreateVoiceDialReport',_0x570d52['message'],_0x1efb71);_0x21f3d1(_0x1083e3['error'](0x1f4,_0x570d52[_0x30f7('0x13')]));});});};exports[_0x30f7('0x1c')]=function(_0x4c686d){var _0x4b77ec=this;return new Promise(function(_0x2ad9e5,_0x86b4f8){return db['VoiceDialReport'][_0x30f7('0x1d')](_0x4c686d[_0x30f7('0x19')],{'raw':_0x4c686d[_0x30f7('0x1a')]?_0x4c686d['options'][_0x30f7('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4c686d[_0x30f7('0x1a')]?_0x4c686d['options'][_0x30f7('0x1e')]||null:null,'attributes':_0x4c686d[_0x30f7('0x1a')]?_0x4c686d['options'][_0x30f7('0x1f')]||null:null,'limit':_0x4c686d[_0x30f7('0x1a')]?_0x4c686d['options'][_0x30f7('0x20')]||null:null})['then'](function(_0x2ec3b9){logger[_0x30f7('0xb')](_0x30f7('0x1c'),_0x4c686d);logger[_0x30f7('0xc')](_0x30f7('0x1c'),_0x4c686d,JSON[_0x30f7('0xf')](_0x2ec3b9));_0x2ad9e5(_0x2ec3b9);})[_0x30f7('0x15')](function(_0x29bec2){logger[_0x30f7('0x10')](_0x30f7('0x1c'),_0x29bec2['message'],_0x4c686d);_0x86b4f8(_0x4b77ec[_0x30f7('0x10')](0x1f4,_0x29bec2['message']));});});};
\ No newline at end of file
+var _0xbaa9=['limit','lodash','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','http','request','info','request\x20sent','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s','stringify','error','VoiceDialReport,\x20%s,\x20%s','message','result','catch','CreateVoiceDialReport','VoiceDialReport','create','body','options','raw','then','UpdateVoiceDialReport','update','where','attributes'];(function(_0x5736fa,_0xbd0b59){var _0x79eb14=function(_0x4a4778){while(--_0x4a4778){_0x5736fa['push'](_0x5736fa['shift']());}};_0x79eb14(++_0xbd0b59);}(_0xbaa9,0xd3));var _0x9baa=function(_0x1986bd,_0x577dfb){_0x1986bd=_0x1986bd-0x0;var _0x4b2041=_0xbaa9[_0x1986bd];return _0x4b2041;};'use strict';var _=require(_0x9baa('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x9baa('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9baa('0x2'));var db=require(_0x9baa('0x3'))['db'];var utils=require(_0x9baa('0x4'));var logger=require(_0x9baa('0x5'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x9baa('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x365c05,_0x816e0e,_0x38f719){return new BPromise(function(_0x446c24,_0x5e49e7){return client[_0x9baa('0x7')](_0x365c05,_0x38f719)['then'](function(_0x499428){logger[_0x9baa('0x8')]('VoiceDialReport,\x20%s,\x20%s',_0x816e0e,_0x9baa('0x9'));logger[_0x9baa('0xa')](_0x9baa('0xb'),_0x816e0e,_0x9baa('0x9'),JSON[_0x9baa('0xc')](_0x499428));if(_0x499428[_0x9baa('0xd')]){if(_0x499428[_0x9baa('0xd')]['code']===0x1f4){logger['error'](_0x9baa('0xe'),_0x816e0e,_0x499428[_0x9baa('0xd')][_0x9baa('0xf')]);return _0x5e49e7(_0x499428[_0x9baa('0xd')][_0x9baa('0xf')]);}logger[_0x9baa('0xd')]('VoiceDialReport,\x20%s,\x20%s',_0x816e0e,_0x499428[_0x9baa('0xd')]['message']);return _0x446c24(_0x499428[_0x9baa('0xd')]['message']);}else{logger[_0x9baa('0x8')](_0x9baa('0xe'),_0x816e0e,_0x9baa('0x9'));_0x446c24(_0x499428[_0x9baa('0x10')][_0x9baa('0xf')]);}})[_0x9baa('0x11')](function(_0x38e1b6){logger[_0x9baa('0xd')](_0x9baa('0xe'),_0x816e0e,_0x38e1b6);_0x5e49e7(_0x38e1b6);});});}exports[_0x9baa('0x12')]=function(_0x6bcbe3){var _0xbce3ac=this;return new Promise(function(_0x19bfaf,_0x1fab52){return db[_0x9baa('0x13')][_0x9baa('0x14')](_0x6bcbe3[_0x9baa('0x15')],{'raw':_0x6bcbe3[_0x9baa('0x16')]?_0x6bcbe3[_0x9baa('0x16')][_0x9baa('0x17')]===undefined?!![]:![]:!![]})[_0x9baa('0x18')](function(_0x15f9cc){logger[_0x9baa('0x8')]('CreateVoiceDialReport',_0x6bcbe3);logger[_0x9baa('0xa')](_0x9baa('0x12'),_0x6bcbe3,JSON[_0x9baa('0xc')](_0x15f9cc));_0x19bfaf(_0x15f9cc);})[_0x9baa('0x11')](function(_0x50b5d5){logger['error']('CreateVoiceDialReport',_0x50b5d5[_0x9baa('0xf')],_0x6bcbe3);_0x1fab52(_0xbce3ac[_0x9baa('0xd')](0x1f4,_0x50b5d5[_0x9baa('0xf')]));});});};exports[_0x9baa('0x19')]=function(_0x4fbf5b){var _0x4c305f=this;return new Promise(function(_0x20c498,_0x4ef0de){return db[_0x9baa('0x13')][_0x9baa('0x1a')](_0x4fbf5b[_0x9baa('0x15')],{'raw':_0x4fbf5b[_0x9baa('0x16')]?_0x4fbf5b['options'][_0x9baa('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4fbf5b[_0x9baa('0x16')]?_0x4fbf5b['options'][_0x9baa('0x1b')]||null:null,'attributes':_0x4fbf5b[_0x9baa('0x16')]?_0x4fbf5b['options'][_0x9baa('0x1c')]||null:null,'limit':_0x4fbf5b['options']?_0x4fbf5b[_0x9baa('0x16')][_0x9baa('0x1d')]||null:null})[_0x9baa('0x18')](function(_0x230477){logger[_0x9baa('0x8')](_0x9baa('0x19'),_0x4fbf5b);logger[_0x9baa('0xa')]('UpdateVoiceDialReport',_0x4fbf5b,JSON[_0x9baa('0xc')](_0x230477));_0x20c498(_0x230477);})[_0x9baa('0x11')](function(_0x4d786c){logger[_0x9baa('0xd')](_0x9baa('0x19'),_0x4d786c[_0x9baa('0xf')],_0x4fbf5b);_0x4ef0de(_0x4c305f[_0x9baa('0xd')](0x1f4,_0x4d786c[_0x9baa('0xf')]));});});};
\ No newline at end of file