Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index e8854ab..a4ddd58 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1e5f=['type','VIRTUAL','options','includeAll','include','rows','show','params','find','create','catch','body','destroy','download','recording','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','audio/wav','attachment','msg_id','attachment;\x20filename=\x22','.wav\x22','rimraf','zip-dir','fast-json-patch','moment','bluebird','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','undefined','limit','count','offset','set','Content-Range','reject','save','update','then','end','error','stack','name','send','index','map','VoiceMailMessage','rawAttributes','key','model','differenceBy','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge'];(function(_0x46bdd8,_0x442f70){var _0x498891=function(_0x25b9c1){while(--_0x25b9c1){_0x46bdd8['push'](_0x46bdd8['shift']());}};_0x498891(++_0x442f70);}(_0x1e5f,0x11c));var _0xf1e5=function(_0x2a7b8e,_0x50ffce){_0x2a7b8e=_0x2a7b8e-0x0;var _0x29b5c8=_0x1e5f[_0x2a7b8e];return _0x29b5c8;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf1e5('0x0'));var zipdir=require(_0xf1e5('0x1'));var jsonpatch=require(_0xf1e5('0x2'));var rp=require('request-promise');var moment=require(_0xf1e5('0x3'));var BPromise=require(_0xf1e5('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0xf1e5('0x5'));var sox=require(_0xf1e5('0x6'));var csv=require('to-csv');var ejs=require(_0xf1e5('0x7'));var fs=require('fs');var fs_extra=require(_0xf1e5('0x8'));var _=require(_0xf1e5('0x9'));var squel=require(_0xf1e5('0xa'));var crypto=require(_0xf1e5('0xb'));var jsforce=require(_0xf1e5('0xc'));var deskjs=require(_0xf1e5('0xd'));var toCsv=require(_0xf1e5('0xe'));var querystring=require(_0xf1e5('0xf'));var Papa=require(_0xf1e5('0x10'));var Redis=require('ioredis');var authService=require(_0xf1e5('0x11'));var qs=require(_0xf1e5('0x12'));var as=require(_0xf1e5('0x13'));var hardwareService=require(_0xf1e5('0x14'));var logger=require('../../config/logger')('api');var utils=require(_0xf1e5('0x15'));var config=require(_0xf1e5('0x16'));var licenseUtil=require(_0xf1e5('0x17'));var db=require(_0xf1e5('0x18'))['db'];function respondWithStatusCode(_0x4cbba1,_0x230b2f){_0x230b2f=_0x230b2f||0xcc;return function(_0x2eecee){if(_0x2eecee){return _0x4cbba1[_0xf1e5('0x19')](_0x230b2f);}return _0x4cbba1[_0xf1e5('0x1a')](_0x230b2f)['end']();};}function respondWithResult(_0x31d579,_0x1a1e3c){_0x1a1e3c=_0x1a1e3c||0xc8;return function(_0x260b74){if(_0x260b74){return _0x31d579[_0xf1e5('0x1a')](_0x1a1e3c)[_0xf1e5('0x1b')](_0x260b74);}};}function respondWithFilteredResult(_0x38febf,_0x3a0fe0){return function(_0xb2fd81){if(_0xb2fd81){var _0x16754a=typeof _0x3a0fe0['offset']===_0xf1e5('0x1c')&&typeof _0x3a0fe0[_0xf1e5('0x1d')]===_0xf1e5('0x1c');var _0x1ab845=_0xb2fd81[_0xf1e5('0x1e')];var _0x57f6c1=_0x16754a?0x0:_0x3a0fe0[_0xf1e5('0x1f')];var _0x2116ea=_0x16754a?_0xb2fd81[_0xf1e5('0x1e')]:_0x3a0fe0[_0xf1e5('0x1f')]+_0x3a0fe0['limit'];var _0x1c224f;if(_0x2116ea>=_0x1ab845){_0x2116ea=_0x1ab845;_0x1c224f=0xc8;}else{_0x1c224f=0xce;}_0x38febf[_0xf1e5('0x1a')](_0x1c224f);return _0x38febf[_0xf1e5('0x20')](_0xf1e5('0x21'),_0x57f6c1+'-'+_0x2116ea+'/'+_0x1ab845)[_0xf1e5('0x1b')](_0xb2fd81);}return null;};}function patchUpdates(_0x300e74){return function(_0x525334){try{jsonpatch['apply'](_0x525334,_0x300e74,!![]);}catch(_0x58eee1){return BPromise[_0xf1e5('0x22')](_0x58eee1);}return _0x525334[_0xf1e5('0x23')]();};}function saveUpdates(_0x360657,_0x381a56){return function(_0x345de9){if(_0x345de9){return _0x345de9[_0xf1e5('0x24')](_0x360657)[_0xf1e5('0x25')](function(_0x3ab8d6){return _0x3ab8d6;});}return null;};}function removeEntity(_0x2f5aff,_0x23b0e4){return function(_0x35d09a){if(_0x35d09a){return _0x35d09a['destroy']()[_0xf1e5('0x25')](function(){_0x2f5aff[_0xf1e5('0x1a')](0xcc)[_0xf1e5('0x26')]();});}};}function handleEntityNotFound(_0x422516,_0x4e97b3){return function(_0x1bf8d0){if(!_0x1bf8d0){_0x422516[_0xf1e5('0x19')](0x194);}return _0x1bf8d0;};}function handleError(_0x2b874c,_0x59ad74){_0x59ad74=_0x59ad74||0x1f4;return function(_0x32ef98){logger[_0xf1e5('0x27')](_0x32ef98[_0xf1e5('0x28')]);if(_0x32ef98['name']){delete _0x32ef98[_0xf1e5('0x29')];}_0x2b874c[_0xf1e5('0x1a')](_0x59ad74)[_0xf1e5('0x2a')](_0x32ef98);};}exports[_0xf1e5('0x2b')]=function(_0x28f209,_0x6ef224){var _0x20e6b1={},_0x217d78={},_0x67271a={'count':0x0,'rows':[]};var _0x116030=_[_0xf1e5('0x2c')](db[_0xf1e5('0x2d')][_0xf1e5('0x2e')],function(_0x507d13){return{'name':_0x507d13['fieldName'],'type':_0x507d13['type'][_0xf1e5('0x2f')]};});_0x217d78[_0xf1e5('0x30')]=_[_0xf1e5('0x31')](_[_0xf1e5('0x2c')](_0x116030,'name'),[_0xf1e5('0x29')]);_0x217d78[_0xf1e5('0x32')]=_[_0xf1e5('0x33')](_0x28f209['query']);_0x217d78[_0xf1e5('0x34')]=_[_0xf1e5('0x35')](_0x217d78['model'],_0x217d78['query']);_0x20e6b1[_0xf1e5('0x36')]=_['intersection'](_0x217d78[_0xf1e5('0x30')],qs[_0xf1e5('0x37')](_0x28f209[_0xf1e5('0x32')][_0xf1e5('0x37')]));_0x20e6b1[_0xf1e5('0x36')]=_0x20e6b1[_0xf1e5('0x36')][_0xf1e5('0x38')]?_0x20e6b1['attributes']:_0x217d78[_0xf1e5('0x30')];if(!_0x28f209['query']['hasOwnProperty'](_0xf1e5('0x39'))){_0x20e6b1['limit']=qs[_0xf1e5('0x1d')](_0x28f209[_0xf1e5('0x32')][_0xf1e5('0x1d')]);_0x20e6b1['offset']=qs[_0xf1e5('0x1f')](_0x28f209[_0xf1e5('0x32')][_0xf1e5('0x1f')]);}_0x20e6b1[_0xf1e5('0x3a')]=qs[_0xf1e5('0x3b')](_0x28f209[_0xf1e5('0x32')][_0xf1e5('0x3b')]);_0x20e6b1[_0xf1e5('0x3c')]=qs[_0xf1e5('0x34')](_[_0xf1e5('0x3d')](_0x28f209[_0xf1e5('0x32')],_0x217d78[_0xf1e5('0x34')]),_0x116030);if(_0x28f209[_0xf1e5('0x32')][_0xf1e5('0x3e')]){_0x20e6b1['where']=_[_0xf1e5('0x3f')](_0x20e6b1[_0xf1e5('0x3c')],{'$or':_['map'](_0x116030,function(_0x4719da){if(_0x4719da[_0xf1e5('0x40')]!==_0xf1e5('0x41')){var _0x5201eb={};_0x5201eb[_0x4719da[_0xf1e5('0x29')]]={'$like':'%'+_0x28f209['query'][_0xf1e5('0x3e')]+'%'};return _0x5201eb;}})});}_0x20e6b1=_[_0xf1e5('0x3f')]({},_0x20e6b1,_0x28f209[_0xf1e5('0x42')]);var _0xfa1c38={'where':_0x20e6b1[_0xf1e5('0x3c')]};return db[_0xf1e5('0x2d')][_0xf1e5('0x1e')](_0xfa1c38)[_0xf1e5('0x25')](function(_0x3cdd33){_0x67271a[_0xf1e5('0x1e')]=_0x3cdd33;if(_0x28f209[_0xf1e5('0x32')][_0xf1e5('0x43')]){_0x20e6b1[_0xf1e5('0x44')]=[{'all':!![]}];}return db[_0xf1e5('0x2d')]['findAll'](_0x20e6b1);})[_0xf1e5('0x25')](function(_0x354b70){_0x67271a[_0xf1e5('0x45')]=_0x354b70;return _0x67271a;})[_0xf1e5('0x25')](respondWithFilteredResult(_0x6ef224,_0x20e6b1))['catch'](handleError(_0x6ef224,null));};exports[_0xf1e5('0x46')]=function(_0x328dd8,_0x415c95){var _0x536c67={'raw':!![],'where':{'id':_0x328dd8[_0xf1e5('0x47')]['id']}},_0x1eff5c={};_0x1eff5c[_0xf1e5('0x30')]=_['keys'](db[_0xf1e5('0x2d')][_0xf1e5('0x2e')]);_0x1eff5c['query']=_[_0xf1e5('0x33')](_0x328dd8['query']);_0x1eff5c[_0xf1e5('0x34')]=_[_0xf1e5('0x35')](_0x1eff5c[_0xf1e5('0x30')],_0x1eff5c[_0xf1e5('0x32')]);_0x536c67[_0xf1e5('0x36')]=_[_0xf1e5('0x35')](_0x1eff5c[_0xf1e5('0x30')],qs[_0xf1e5('0x37')](_0x328dd8[_0xf1e5('0x32')][_0xf1e5('0x37')]));_0x536c67[_0xf1e5('0x36')]=_0x536c67[_0xf1e5('0x36')][_0xf1e5('0x38')]?_0x536c67[_0xf1e5('0x36')]:_0x1eff5c[_0xf1e5('0x30')];if(_0x328dd8[_0xf1e5('0x32')][_0xf1e5('0x43')]){_0x536c67[_0xf1e5('0x44')]=[{'all':!![]}];}_0x536c67=_[_0xf1e5('0x3f')]({},_0x536c67,_0x328dd8[_0xf1e5('0x42')]);return db['VoiceMailMessage'][_0xf1e5('0x48')](_0x536c67)[_0xf1e5('0x25')](handleEntityNotFound(_0x415c95,null))[_0xf1e5('0x25')](respondWithResult(_0x415c95,null))['catch'](handleError(_0x415c95,null));};exports[_0xf1e5('0x49')]=function(_0x169b15,_0x257326){return db[_0xf1e5('0x2d')][_0xf1e5('0x49')](_0x169b15['body'],{})[_0xf1e5('0x25')](respondWithResult(_0x257326,0xc9))[_0xf1e5('0x4a')](handleError(_0x257326,null));};exports[_0xf1e5('0x24')]=function(_0x219a89,_0x5e0481){if(_0x219a89[_0xf1e5('0x4b')]['id']){delete _0x219a89[_0xf1e5('0x4b')]['id'];}return db[_0xf1e5('0x2d')][_0xf1e5('0x48')]({'where':{'id':_0x219a89['params']['id']}})['then'](handleEntityNotFound(_0x5e0481,null))['then'](saveUpdates(_0x219a89['body'],null))['then'](respondWithResult(_0x5e0481,null))[_0xf1e5('0x4a')](handleError(_0x5e0481,null));};exports[_0xf1e5('0x4c')]=function(_0x7beffd,_0x402a82){return db[_0xf1e5('0x2d')]['find']({'where':{'id':_0x7beffd[_0xf1e5('0x47')]['id']}})[_0xf1e5('0x25')](handleEntityNotFound(_0x402a82,null))[_0xf1e5('0x25')](removeEntity(_0x402a82,null))[_0xf1e5('0x4a')](handleError(_0x402a82,null));};exports[_0xf1e5('0x4d')]=function(_0x47eaab,_0x175935,_0x4f36dc){return db[_0xf1e5('0x2d')][_0xf1e5('0x48')]({'where':{'id':_0x47eaab[_0xf1e5('0x47')]['id']},'attributes':['id',_0xf1e5('0x4e'),'msg_id']})[_0xf1e5('0x25')](handleEntityNotFound(_0x175935,null))[_0xf1e5('0x25')](function(_0x1d850f){if(_0x1d850f){if(!_0x1d850f[_0xf1e5('0x4e')]){throw new db[(_0xf1e5('0x4f'))][(_0xf1e5('0x50'))](_0xf1e5('0x51'));}var _0x3e7656={'Content-Type':_0xf1e5('0x52'),'Content-Disposition':_0xf1e5('0x53')};if(_0x1d850f[_0xf1e5('0x54')]){_0x3e7656['Content-Disposition']=_0xf1e5('0x55')+_0x1d850f[_0xf1e5('0x54')]+_0xf1e5('0x56');}_0x175935[_0xf1e5('0x20')](_0x3e7656);return _0x175935[_0xf1e5('0x2a')](new Buffer(_0x1d850f[_0xf1e5('0x4e')]));}})[_0xf1e5('0x4a')](handleError(_0x175935,null));};
\ No newline at end of file
+var _0xa258=['ValidationError','VoiceMailMessage\x20not\x20found','attachment','msg_id','Content-Disposition','attachment;\x20filename=\x22','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','ejs','fs-extra','lodash','crypto','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','limit','count','offset','set','Content-Range','apply','reject','update','destroy','then','error','stack','name','map','VoiceMailMessage','rawAttributes','fieldName','type','model','differenceBy','query','keys','attributes','intersection','fields','nolimit','sort','where','pick','filters','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','create','body','find','download','recording','Sequelize'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa258,0x146));var _0x8a25=function(_0xe8b463,_0x129158){_0xe8b463=_0xe8b463-0x0;var _0x24141b=_0xa258[_0xe8b463];return _0x24141b;};'use strict';var emlformat=require(_0x8a25('0x0'));var rimraf=require(_0x8a25('0x1'));var zipdir=require(_0x8a25('0x2'));var jsonpatch=require(_0x8a25('0x3'));var rp=require(_0x8a25('0x4'));var moment=require(_0x8a25('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x8a25('0x6'));var util=require(_0x8a25('0x7'));var path=require('path');var sox=require(_0x8a25('0x8'));var csv=require('to-csv');var ejs=require(_0x8a25('0x9'));var fs=require('fs');var fs_extra=require(_0x8a25('0xa'));var _=require(_0x8a25('0xb'));var squel=require('squel');var crypto=require(_0x8a25('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x8a25('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x8a25('0xe'));var Redis=require('ioredis');var authService=require(_0x8a25('0xf'));var qs=require(_0x8a25('0x10'));var as=require(_0x8a25('0x11'));var hardwareService=require(_0x8a25('0x12'));var logger=require('../../config/logger')(_0x8a25('0x13'));var utils=require(_0x8a25('0x14'));var config=require(_0x8a25('0x15'));var licenseUtil=require(_0x8a25('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x499495,_0x74d796){_0x74d796=_0x74d796||0xcc;return function(_0x558ffa){if(_0x558ffa){return _0x499495[_0x8a25('0x17')](_0x74d796);}return _0x499495[_0x8a25('0x18')](_0x74d796)[_0x8a25('0x19')]();};}function respondWithResult(_0x561a3d,_0x11403f){_0x11403f=_0x11403f||0xc8;return function(_0xef5fd1){if(_0xef5fd1){return _0x561a3d[_0x8a25('0x18')](_0x11403f)[_0x8a25('0x1a')](_0xef5fd1);}};}function respondWithFilteredResult(_0x3d60b8,_0x48bf73){return function(_0x53c2dd){if(_0x53c2dd){var _0x353de7=typeof _0x48bf73['offset']==='undefined'&&typeof _0x48bf73[_0x8a25('0x1b')]==='undefined';var _0x3bc440=_0x53c2dd[_0x8a25('0x1c')];var _0x29e956=_0x353de7?0x0:_0x48bf73[_0x8a25('0x1d')];var _0x343bc4=_0x353de7?_0x53c2dd[_0x8a25('0x1c')]:_0x48bf73[_0x8a25('0x1d')]+_0x48bf73[_0x8a25('0x1b')];var _0x29db74;if(_0x343bc4>=_0x3bc440){_0x343bc4=_0x3bc440;_0x29db74=0xc8;}else{_0x29db74=0xce;}_0x3d60b8[_0x8a25('0x18')](_0x29db74);return _0x3d60b8[_0x8a25('0x1e')](_0x8a25('0x1f'),_0x29e956+'-'+_0x343bc4+'/'+_0x3bc440)[_0x8a25('0x1a')](_0x53c2dd);}return null;};}function patchUpdates(_0x21b992){return function(_0x3914c0){try{jsonpatch[_0x8a25('0x20')](_0x3914c0,_0x21b992,!![]);}catch(_0x2bdbad){return BPromise[_0x8a25('0x21')](_0x2bdbad);}return _0x3914c0['save']();};}function saveUpdates(_0x26f161,_0x492910){return function(_0x15857a){if(_0x15857a){return _0x15857a[_0x8a25('0x22')](_0x26f161)['then'](function(_0x3b1b45){return _0x3b1b45;});}return null;};}function removeEntity(_0x1ce857,_0x3dc48e){return function(_0x4cfaea){if(_0x4cfaea){return _0x4cfaea[_0x8a25('0x23')]()[_0x8a25('0x24')](function(){_0x1ce857[_0x8a25('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5efe23,_0x86e851){return function(_0xf6c985){if(!_0xf6c985){_0x5efe23[_0x8a25('0x17')](0x194);}return _0xf6c985;};}function handleError(_0xebf26,_0xb26098){_0xb26098=_0xb26098||0x1f4;return function(_0x226be2){logger[_0x8a25('0x25')](_0x226be2[_0x8a25('0x26')]);if(_0x226be2['name']){delete _0x226be2[_0x8a25('0x27')];}_0xebf26[_0x8a25('0x18')](_0xb26098)['send'](_0x226be2);};}exports['index']=function(_0x204ba5,_0x53b56a){var _0x4f4e23={},_0x38019e={},_0x2514e3={'count':0x0,'rows':[]};var _0x64876b=_[_0x8a25('0x28')](db[_0x8a25('0x29')][_0x8a25('0x2a')],function(_0x51b369){return{'name':_0x51b369[_0x8a25('0x2b')],'type':_0x51b369[_0x8a25('0x2c')]['key']};});_0x38019e[_0x8a25('0x2d')]=_[_0x8a25('0x2e')](_[_0x8a25('0x28')](_0x64876b,_0x8a25('0x27')),[_0x8a25('0x27')]);_0x38019e[_0x8a25('0x2f')]=_[_0x8a25('0x30')](_0x204ba5[_0x8a25('0x2f')]);_0x38019e['filters']=_['intersection'](_0x38019e['model'],_0x38019e['query']);_0x4f4e23[_0x8a25('0x31')]=_[_0x8a25('0x32')](_0x38019e[_0x8a25('0x2d')],qs[_0x8a25('0x33')](_0x204ba5[_0x8a25('0x2f')]['fields']));_0x4f4e23['attributes']=_0x4f4e23[_0x8a25('0x31')]['length']?_0x4f4e23[_0x8a25('0x31')]:_0x38019e[_0x8a25('0x2d')];if(!_0x204ba5[_0x8a25('0x2f')]['hasOwnProperty'](_0x8a25('0x34'))){_0x4f4e23[_0x8a25('0x1b')]=qs['limit'](_0x204ba5[_0x8a25('0x2f')][_0x8a25('0x1b')]);_0x4f4e23[_0x8a25('0x1d')]=qs[_0x8a25('0x1d')](_0x204ba5[_0x8a25('0x2f')][_0x8a25('0x1d')]);}_0x4f4e23['order']=qs['sort'](_0x204ba5['query'][_0x8a25('0x35')]);_0x4f4e23[_0x8a25('0x36')]=qs['filters'](_[_0x8a25('0x37')](_0x204ba5[_0x8a25('0x2f')],_0x38019e[_0x8a25('0x38')]),_0x64876b);if(_0x204ba5[_0x8a25('0x2f')][_0x8a25('0x39')]){_0x4f4e23['where']=_[_0x8a25('0x3a')](_0x4f4e23[_0x8a25('0x36')],{'$or':_[_0x8a25('0x28')](_0x64876b,function(_0x53f6d1){if(_0x53f6d1[_0x8a25('0x2c')]!==_0x8a25('0x3b')){var _0x5363bb={};_0x5363bb[_0x53f6d1[_0x8a25('0x27')]]={'$like':'%'+_0x204ba5[_0x8a25('0x2f')][_0x8a25('0x39')]+'%'};return _0x5363bb;}})});}_0x4f4e23=_['merge']({},_0x4f4e23,_0x204ba5[_0x8a25('0x3c')]);var _0x377873={'where':_0x4f4e23[_0x8a25('0x36')]};return db[_0x8a25('0x29')][_0x8a25('0x1c')](_0x377873)[_0x8a25('0x24')](function(_0x38b4fa){_0x2514e3['count']=_0x38b4fa;if(_0x204ba5[_0x8a25('0x2f')][_0x8a25('0x3d')]){_0x4f4e23[_0x8a25('0x3e')]=[{'all':!![]}];}return db[_0x8a25('0x29')][_0x8a25('0x3f')](_0x4f4e23);})[_0x8a25('0x24')](function(_0x1b21fa){_0x2514e3[_0x8a25('0x40')]=_0x1b21fa;return _0x2514e3;})[_0x8a25('0x24')](respondWithFilteredResult(_0x53b56a,_0x4f4e23))[_0x8a25('0x41')](handleError(_0x53b56a,null));};exports[_0x8a25('0x42')]=function(_0xe49f28,_0x594f0e){var _0x1017d1={'raw':!![],'where':{'id':_0xe49f28[_0x8a25('0x43')]['id']}},_0x50c7a4={};_0x50c7a4['model']=_['keys'](db[_0x8a25('0x29')][_0x8a25('0x2a')]);_0x50c7a4['query']=_[_0x8a25('0x30')](_0xe49f28[_0x8a25('0x2f')]);_0x50c7a4['filters']=_[_0x8a25('0x32')](_0x50c7a4['model'],_0x50c7a4[_0x8a25('0x2f')]);_0x1017d1[_0x8a25('0x31')]=_[_0x8a25('0x32')](_0x50c7a4[_0x8a25('0x2d')],qs[_0x8a25('0x33')](_0xe49f28[_0x8a25('0x2f')][_0x8a25('0x33')]));_0x1017d1[_0x8a25('0x31')]=_0x1017d1[_0x8a25('0x31')]['length']?_0x1017d1[_0x8a25('0x31')]:_0x50c7a4[_0x8a25('0x2d')];if(_0xe49f28['query']['includeAll']){_0x1017d1[_0x8a25('0x3e')]=[{'all':!![]}];}_0x1017d1=_[_0x8a25('0x3a')]({},_0x1017d1,_0xe49f28['options']);return db['VoiceMailMessage']['find'](_0x1017d1)[_0x8a25('0x24')](handleEntityNotFound(_0x594f0e,null))[_0x8a25('0x24')](respondWithResult(_0x594f0e,null))['catch'](handleError(_0x594f0e,null));};exports['create']=function(_0x25eb0a,_0x2fba66){return db[_0x8a25('0x29')][_0x8a25('0x44')](_0x25eb0a[_0x8a25('0x45')],{})[_0x8a25('0x24')](respondWithResult(_0x2fba66,0xc9))[_0x8a25('0x41')](handleError(_0x2fba66,null));};exports[_0x8a25('0x22')]=function(_0x702bba,_0x3b04c4){if(_0x702bba[_0x8a25('0x45')]['id']){delete _0x702bba[_0x8a25('0x45')]['id'];}return db['VoiceMailMessage'][_0x8a25('0x46')]({'where':{'id':_0x702bba['params']['id']}})[_0x8a25('0x24')](handleEntityNotFound(_0x3b04c4,null))[_0x8a25('0x24')](saveUpdates(_0x702bba[_0x8a25('0x45')],null))[_0x8a25('0x24')](respondWithResult(_0x3b04c4,null))['catch'](handleError(_0x3b04c4,null));};exports['destroy']=function(_0x4b63cc,_0x4fad62){return db[_0x8a25('0x29')][_0x8a25('0x46')]({'where':{'id':_0x4b63cc['params']['id']}})[_0x8a25('0x24')](handleEntityNotFound(_0x4fad62,null))[_0x8a25('0x24')](removeEntity(_0x4fad62,null))[_0x8a25('0x41')](handleError(_0x4fad62,null));};exports[_0x8a25('0x47')]=function(_0x9c8508,_0x4bc220,_0x14ea7a){return db[_0x8a25('0x29')][_0x8a25('0x46')]({'where':{'id':_0x9c8508[_0x8a25('0x43')]['id']},'attributes':['id',_0x8a25('0x48'),'msg_id']})[_0x8a25('0x24')](handleEntityNotFound(_0x4bc220,null))[_0x8a25('0x24')](function(_0x272339){if(_0x272339){if(!_0x272339['recording']){throw new db[(_0x8a25('0x49'))][(_0x8a25('0x4a'))](_0x8a25('0x4b'));}var _0x1ea8b3={'Content-Type':'audio/wav','Content-Disposition':_0x8a25('0x4c')};if(_0x272339[_0x8a25('0x4d')]){_0x1ea8b3[_0x8a25('0x4e')]=_0x8a25('0x4f')+_0x272339[_0x8a25('0x4d')]+'.wav\x22';}_0x4bc220[_0x8a25('0x1e')](_0x1ea8b3);return _0x4bc220['send'](new Buffer(_0x272339[_0x8a25('0x48')]));}})[_0x8a25('0x41')](handleError(_0x4bc220,null));};
\ No newline at end of file