Built motion from commit (unavailable).|2.0.70
[motion2.git] / server / api / voiceDialReport / voiceDialReport.rpc.js
index e40b128..1218632 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f66=['CreateVoiceDialReport','body','stringify','catch','UpdateVoiceDialReport','VoiceDialReport','options','where','attributes','limit','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','request\x20sent','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s','error','message','VoiceDialReport,\x20%s,\x20%s','info','result'];(function(_0x433064,_0x3e7add){var _0x2d93b0=function(_0x347744){while(--_0x347744){_0x433064['push'](_0x433064['shift']());}};_0x2d93b0(++_0x3e7add);}(_0x5f66,0x1a0));var _0x65f6=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x5f66[_0x20a584];return _0x4b41a8;};'use strict';var _=require('lodash');var util=require(_0x65f6('0x0'));var moment=require('moment');var BPromise=require(_0x65f6('0x1'));var rs=require(_0x65f6('0x2'));var fs=require('fs');var db=require(_0x65f6('0x3'))['db'];var utils=require(_0x65f6('0x4'));var logger=require(_0x65f6('0x5'))('rpc');var config=require(_0x65f6('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x65f6('0x7')][_0x65f6('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4ec221,_0x4ed98f,_0x1c0e12){return new BPromise(function(_0x2c6571,_0x112079){return client[_0x65f6('0x9')](_0x4ec221,_0x1c0e12)[_0x65f6('0xa')](function(_0x14f4c7){logger['info']('VoiceDialReport,\x20%s,\x20%s',_0x4ed98f,_0x65f6('0xb'));logger[_0x65f6('0xc')](_0x65f6('0xd'),_0x4ed98f,_0x65f6('0xb'),JSON['stringify'](_0x14f4c7));if(_0x14f4c7[_0x65f6('0xe')]){if(_0x14f4c7['error']['code']===0x1f4){logger[_0x65f6('0xe')]('VoiceDialReport,\x20%s,\x20%s',_0x4ed98f,_0x14f4c7[_0x65f6('0xe')]['message']);return _0x112079(_0x14f4c7[_0x65f6('0xe')][_0x65f6('0xf')]);}logger[_0x65f6('0xe')](_0x65f6('0x10'),_0x4ed98f,_0x14f4c7[_0x65f6('0xe')][_0x65f6('0xf')]);return _0x2c6571(_0x14f4c7[_0x65f6('0xe')][_0x65f6('0xf')]);}else{logger[_0x65f6('0x11')](_0x65f6('0x10'),_0x4ed98f,'request\x20sent');_0x2c6571(_0x14f4c7[_0x65f6('0x12')]['message']);}})['catch'](function(_0x1693e6){logger[_0x65f6('0xe')](_0x65f6('0x10'),_0x4ed98f,_0x1693e6);_0x112079(_0x1693e6);});});}exports[_0x65f6('0x13')]=function(_0x1b1cbb){var _0x1f974c=this;return new Promise(function(_0xc8660c,_0x18380e){return db['VoiceDialReport']['create'](_0x1b1cbb[_0x65f6('0x14')],{'raw':_0x1b1cbb['options']?_0x1b1cbb['options']['raw']===undefined?!![]:![]:!![]})[_0x65f6('0xa')](function(_0x21ea88){logger['info'](_0x65f6('0x13'),_0x1b1cbb);logger[_0x65f6('0xc')](_0x65f6('0x13'),_0x1b1cbb,JSON[_0x65f6('0x15')](_0x21ea88));_0xc8660c(_0x21ea88);})[_0x65f6('0x16')](function(_0xc139c2){logger['error'](_0x65f6('0x13'),_0xc139c2['message'],_0x1b1cbb);_0x18380e(_0x1f974c['error'](0x1f4,_0xc139c2[_0x65f6('0xf')]));});});};exports[_0x65f6('0x17')]=function(_0x524e42){var _0x1eeaaa=this;return new Promise(function(_0x471a33,_0x2317ce){return db[_0x65f6('0x18')]['update'](_0x524e42[_0x65f6('0x14')],{'raw':_0x524e42[_0x65f6('0x19')]?_0x524e42[_0x65f6('0x19')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x524e42['options']?_0x524e42['options'][_0x65f6('0x1a')]||null:null,'attributes':_0x524e42[_0x65f6('0x19')]?_0x524e42['options'][_0x65f6('0x1b')]||null:null,'limit':_0x524e42[_0x65f6('0x19')]?_0x524e42['options'][_0x65f6('0x1c')]||null:null})[_0x65f6('0xa')](function(_0x28d0df){logger['info']('UpdateVoiceDialReport',_0x524e42);logger['debug'](_0x65f6('0x17'),_0x524e42,JSON[_0x65f6('0x15')](_0x28d0df));_0x471a33(_0x28d0df);})[_0x65f6('0x16')](function(_0x408ccc){logger[_0x65f6('0xe')](_0x65f6('0x17'),_0x408ccc[_0x65f6('0xf')],_0x524e42);_0x2317ce(_0x1eeaaa['error'](0x1f4,_0x408ccc['message']));});});};
\ No newline at end of file
+var _0x57ca=['update','where','attributes','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','then','info','VoiceDialReport,\x20%s,\x20%s','debug','request\x20sent','stringify','error','message','catch','VoiceDialReport','create','body','options','raw','CreateVoiceDialReport','UpdateVoiceDialReport'];(function(_0x474cc2,_0x4c930b){var _0x5f5360=function(_0x565d66){while(--_0x565d66){_0x474cc2['push'](_0x474cc2['shift']());}};_0x5f5360(++_0x4c930b);}(_0x57ca,0x108));var _0xa57c=function(_0x27e2c8,_0x5f40a0){_0x27e2c8=_0x27e2c8-0x0;var _0x5454d4=_0x57ca[_0x27e2c8];return _0x5454d4;};'use strict';var _=require('lodash');var util=require(_0xa57c('0x0'));var moment=require(_0xa57c('0x1'));var BPromise=require('bluebird');var rs=require(_0xa57c('0x2'));var fs=require('fs');var db=require(_0xa57c('0x3'))['db'];var utils=require(_0xa57c('0x4'));var logger=require(_0xa57c('0x5'))(_0xa57c('0x6'));var config=require('../../config/environment');var jayson=require(_0xa57c('0x7'));var client=jayson[_0xa57c('0x8')][_0xa57c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x19473f,_0xbdfffb,_0x314574){return new BPromise(function(_0x19e28e,_0x271ccc){return client['request'](_0x19473f,_0x314574)[_0xa57c('0xa')](function(_0x4b51d8){logger[_0xa57c('0xb')](_0xa57c('0xc'),_0xbdfffb,'request\x20sent');logger[_0xa57c('0xd')]('VoiceDialReport,\x20%s,\x20%s,\x20%s',_0xbdfffb,_0xa57c('0xe'),JSON[_0xa57c('0xf')](_0x4b51d8));if(_0x4b51d8['error']){if(_0x4b51d8[_0xa57c('0x10')]['code']===0x1f4){logger[_0xa57c('0x10')](_0xa57c('0xc'),_0xbdfffb,_0x4b51d8[_0xa57c('0x10')][_0xa57c('0x11')]);return _0x271ccc(_0x4b51d8[_0xa57c('0x10')]['message']);}logger[_0xa57c('0x10')]('VoiceDialReport,\x20%s,\x20%s',_0xbdfffb,_0x4b51d8[_0xa57c('0x10')][_0xa57c('0x11')]);return _0x19e28e(_0x4b51d8[_0xa57c('0x10')][_0xa57c('0x11')]);}else{logger[_0xa57c('0xb')](_0xa57c('0xc'),_0xbdfffb,_0xa57c('0xe'));_0x19e28e(_0x4b51d8['result'][_0xa57c('0x11')]);}})[_0xa57c('0x12')](function(_0x261725){logger['error'](_0xa57c('0xc'),_0xbdfffb,_0x261725);_0x271ccc(_0x261725);});});}exports['CreateVoiceDialReport']=function(_0x3e7afa){var _0x3d781d=this;return new Promise(function(_0x93462c,_0xe3d505){return db[_0xa57c('0x13')][_0xa57c('0x14')](_0x3e7afa[_0xa57c('0x15')],{'raw':_0x3e7afa[_0xa57c('0x16')]?_0x3e7afa['options'][_0xa57c('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x4a35bb){logger[_0xa57c('0xb')](_0xa57c('0x18'),_0x3e7afa);logger[_0xa57c('0xd')](_0xa57c('0x18'),_0x3e7afa,JSON['stringify'](_0x4a35bb));_0x93462c(_0x4a35bb);})[_0xa57c('0x12')](function(_0x25715f){logger[_0xa57c('0x10')](_0xa57c('0x18'),_0x25715f[_0xa57c('0x11')],_0x3e7afa);_0xe3d505(_0x3d781d[_0xa57c('0x10')](0x1f4,_0x25715f[_0xa57c('0x11')]));});});};exports[_0xa57c('0x19')]=function(_0x2e99ed){var _0xdf65dd=this;return new Promise(function(_0x382a26,_0x1e7f7a){return db[_0xa57c('0x13')][_0xa57c('0x1a')](_0x2e99ed[_0xa57c('0x15')],{'raw':_0x2e99ed['options']?_0x2e99ed[_0xa57c('0x16')][_0xa57c('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2e99ed[_0xa57c('0x16')]?_0x2e99ed[_0xa57c('0x16')][_0xa57c('0x1b')]||null:null,'attributes':_0x2e99ed[_0xa57c('0x16')]?_0x2e99ed[_0xa57c('0x16')][_0xa57c('0x1c')]||null:null,'limit':_0x2e99ed[_0xa57c('0x16')]?_0x2e99ed[_0xa57c('0x16')]['limit']||null:null})[_0xa57c('0xa')](function(_0x4c1478){logger['info'](_0xa57c('0x19'),_0x2e99ed);logger[_0xa57c('0xd')]('UpdateVoiceDialReport',_0x2e99ed,JSON[_0xa57c('0xf')](_0x4c1478));_0x382a26(_0x4c1478);})[_0xa57c('0x12')](function(_0x3eb9e9){logger['error'](_0xa57c('0x19'),_0x3eb9e9['message'],_0x2e99ed);_0x1e7f7a(_0xdf65dd[_0xa57c('0x10')](0x1f4,_0x3eb9e9['message']));});});};
\ No newline at end of file