Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / voiceDialReport / voiceDialReport.rpc.js
index 2764f4b..680a34f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x94a5=['code','message','info','result','catch','CreateVoiceDialReport','VoiceDialReport','create','options','raw','then','body','attributes','limit','UpdateVoiceDialReport','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','client','request','VoiceDialReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error'];(function(_0x205e5b,_0x3d9293){var _0x2e60db=function(_0x2e2620){while(--_0x2e2620){_0x205e5b['push'](_0x205e5b['shift']());}};_0x2e60db(++_0x3d9293);}(_0x94a5,0x1ef));var _0x594a=function(_0x9a3c82,_0x39b592){_0x9a3c82=_0x9a3c82-0x0;var _0x52a746=_0x94a5[_0x9a3c82];return _0x52a746;};'use strict';var _=require(_0x594a('0x0'));var util=require(_0x594a('0x1'));var moment=require('moment');var BPromise=require(_0x594a('0x2'));var rs=require(_0x594a('0x3'));var fs=require('fs');var Redis=require(_0x594a('0x4'));var db=require(_0x594a('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x594a('0x6'));var config=require(_0x594a('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x594a('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x35f450,_0x3e7410,_0x3bde48){return new BPromise(function(_0x314c89,_0x2433c0){return client[_0x594a('0x9')](_0x35f450,_0x3bde48)['then'](function(_0xc6009c){logger['info'](_0x594a('0xa'),_0x3e7410,_0x594a('0xb'));logger[_0x594a('0xc')]('VoiceDialReport,\x20%s,\x20%s,\x20%s',_0x3e7410,_0x594a('0xb'),JSON[_0x594a('0xd')](_0xc6009c));if(_0xc6009c[_0x594a('0xe')]){if(_0xc6009c[_0x594a('0xe')][_0x594a('0xf')]===0x1f4){logger['error'](_0x594a('0xa'),_0x3e7410,_0xc6009c[_0x594a('0xe')][_0x594a('0x10')]);return _0x2433c0(_0xc6009c['error'][_0x594a('0x10')]);}logger[_0x594a('0xe')](_0x594a('0xa'),_0x3e7410,_0xc6009c[_0x594a('0xe')][_0x594a('0x10')]);return _0x314c89(_0xc6009c[_0x594a('0xe')][_0x594a('0x10')]);}else{logger[_0x594a('0x11')]('VoiceDialReport,\x20%s,\x20%s',_0x3e7410,'request\x20sent');_0x314c89(_0xc6009c[_0x594a('0x12')]['message']);}})[_0x594a('0x13')](function(_0x3766ea){logger['error']('VoiceDialReport,\x20%s,\x20%s',_0x3e7410,_0x3766ea);_0x2433c0(_0x3766ea);});});}exports[_0x594a('0x14')]=function(_0x2a591e){var _0x5d9d67=this;return new Promise(function(_0x45a23c,_0x506a3f){return db[_0x594a('0x15')][_0x594a('0x16')](_0x2a591e['body'],{'raw':_0x2a591e[_0x594a('0x17')]?_0x2a591e['options'][_0x594a('0x18')]===undefined?!![]:![]:!![]})[_0x594a('0x19')](function(_0x48411a){logger[_0x594a('0x11')](_0x594a('0x14'),_0x2a591e);logger['debug'](_0x594a('0x14'),_0x2a591e,JSON[_0x594a('0xd')](_0x48411a));_0x45a23c(_0x48411a);})[_0x594a('0x13')](function(_0x59b4db){logger[_0x594a('0xe')](_0x594a('0x14'),_0x59b4db['message'],_0x2a591e);_0x506a3f(_0x5d9d67[_0x594a('0xe')](0x1f4,_0x59b4db[_0x594a('0x10')]));});});};exports['UpdateVoiceDialReport']=function(_0x448f00){var _0x46f3f1=this;return new Promise(function(_0x40436b,_0x1819d0){return db['VoiceDialReport']['update'](_0x448f00[_0x594a('0x1a')],{'raw':_0x448f00[_0x594a('0x17')]?_0x448f00[_0x594a('0x17')][_0x594a('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x448f00[_0x594a('0x17')]?_0x448f00[_0x594a('0x17')]['where']||null:null,'attributes':_0x448f00[_0x594a('0x17')]?_0x448f00[_0x594a('0x17')][_0x594a('0x1b')]||null:null,'limit':_0x448f00[_0x594a('0x17')]?_0x448f00[_0x594a('0x17')][_0x594a('0x1c')]||null:null})[_0x594a('0x19')](function(_0x413e23){logger[_0x594a('0x11')](_0x594a('0x1d'),_0x448f00);logger[_0x594a('0xc')](_0x594a('0x1d'),_0x448f00,JSON[_0x594a('0xd')](_0x413e23));_0x40436b(_0x413e23);})[_0x594a('0x13')](function(_0x5a0cf4){logger[_0x594a('0xe')](_0x594a('0x1d'),_0x5a0cf4[_0x594a('0x10')],_0x448f00);_0x1819d0(_0x46f3f1[_0x594a('0xe')](0x1f4,_0x5a0cf4[_0x594a('0x10')]));});});};
\ No newline at end of file
+var _0x35bf=['jayson/promise','client','http','request','then','info','VoiceDialReport,\x20%s,\x20%s','request\x20sent','VoiceDialReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateVoiceDialReport','create','body','options','raw','UpdateVoiceDialReport','VoiceDialReport','update','attributes','limit','debug','lodash','util','moment','bluebird','randomstring','../../config/logger','rpc','../../config/environment'];(function(_0x19ffee,_0x5abed3){var _0x424a76=function(_0x3b33f0){while(--_0x3b33f0){_0x19ffee['push'](_0x19ffee['shift']());}};_0x424a76(++_0x5abed3);}(_0x35bf,0xa2));var _0xf35b=function(_0x103c7c,_0x1b3d9c){_0x103c7c=_0x103c7c-0x0;var _0x2f343f=_0x35bf[_0x103c7c];return _0x2f343f;};'use strict';var _=require(_0xf35b('0x0'));var util=require(_0xf35b('0x1'));var moment=require(_0xf35b('0x2'));var BPromise=require(_0xf35b('0x3'));var rs=require(_0xf35b('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xf35b('0x5'))(_0xf35b('0x6'));var config=require(_0xf35b('0x7'));var jayson=require(_0xf35b('0x8'));var client=jayson[_0xf35b('0x9')][_0xf35b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2f308f,_0x13c6cc,_0x29b48d){return new BPromise(function(_0x3c5c20,_0x365172){return client[_0xf35b('0xb')](_0x2f308f,_0x29b48d)[_0xf35b('0xc')](function(_0x5aa51c){logger[_0xf35b('0xd')](_0xf35b('0xe'),_0x13c6cc,_0xf35b('0xf'));logger['debug'](_0xf35b('0x10'),_0x13c6cc,_0xf35b('0xf'),JSON[_0xf35b('0x11')](_0x5aa51c));if(_0x5aa51c[_0xf35b('0x12')]){if(_0x5aa51c[_0xf35b('0x12')][_0xf35b('0x13')]===0x1f4){logger[_0xf35b('0x12')](_0xf35b('0xe'),_0x13c6cc,_0x5aa51c[_0xf35b('0x12')][_0xf35b('0x14')]);return _0x365172(_0x5aa51c[_0xf35b('0x12')][_0xf35b('0x14')]);}logger[_0xf35b('0x12')](_0xf35b('0xe'),_0x13c6cc,_0x5aa51c[_0xf35b('0x12')][_0xf35b('0x14')]);return _0x3c5c20(_0x5aa51c[_0xf35b('0x12')]['message']);}else{logger[_0xf35b('0xd')](_0xf35b('0xe'),_0x13c6cc,_0xf35b('0xf'));_0x3c5c20(_0x5aa51c[_0xf35b('0x15')][_0xf35b('0x14')]);}})[_0xf35b('0x16')](function(_0x2c4e1d){logger[_0xf35b('0x12')]('VoiceDialReport,\x20%s,\x20%s',_0x13c6cc,_0x2c4e1d);_0x365172(_0x2c4e1d);});});}exports[_0xf35b('0x17')]=function(_0x3f33a3){var _0x3d50c1=this;return new Promise(function(_0x2410dd,_0x32250f){return db['VoiceDialReport'][_0xf35b('0x18')](_0x3f33a3[_0xf35b('0x19')],{'raw':_0x3f33a3['options']?_0x3f33a3[_0xf35b('0x1a')][_0xf35b('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0xa9e711){logger[_0xf35b('0xd')](_0xf35b('0x17'),_0x3f33a3);logger['debug'](_0xf35b('0x17'),_0x3f33a3,JSON[_0xf35b('0x11')](_0xa9e711));_0x2410dd(_0xa9e711);})[_0xf35b('0x16')](function(_0x26f6d9){logger['error'](_0xf35b('0x17'),_0x26f6d9[_0xf35b('0x14')],_0x3f33a3);_0x32250f(_0x3d50c1[_0xf35b('0x12')](0x1f4,_0x26f6d9['message']));});});};exports[_0xf35b('0x1c')]=function(_0x2617bb){var _0x4e3f0a=this;return new Promise(function(_0x4a3a82,_0x3c6155){return db[_0xf35b('0x1d')][_0xf35b('0x1e')](_0x2617bb[_0xf35b('0x19')],{'raw':_0x2617bb[_0xf35b('0x1a')]?_0x2617bb['options'][_0xf35b('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2617bb[_0xf35b('0x1a')]?_0x2617bb['options']['where']||null:null,'attributes':_0x2617bb[_0xf35b('0x1a')]?_0x2617bb['options'][_0xf35b('0x1f')]||null:null,'limit':_0x2617bb[_0xf35b('0x1a')]?_0x2617bb[_0xf35b('0x1a')][_0xf35b('0x20')]||null:null})[_0xf35b('0xc')](function(_0x1f5cc4){logger[_0xf35b('0xd')](_0xf35b('0x1c'),_0x2617bb);logger[_0xf35b('0x21')](_0xf35b('0x1c'),_0x2617bb,JSON[_0xf35b('0x11')](_0x1f5cc4));_0x4a3a82(_0x1f5cc4);})[_0xf35b('0x16')](function(_0x2fb744){logger[_0xf35b('0x12')](_0xf35b('0x1c'),_0x2fb744['message'],_0x2617bb);_0x3c6155(_0x4e3f0a[_0xf35b('0x12')](0x1f4,_0x2fb744[_0xf35b('0x14')]));});});};
\ No newline at end of file