Built motion from commit d1eab355.|2.6.28
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index b9addd5..f62b982 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe493=['save','update','then','end','error','stack','name','send','index','rawAttributes','type','model','differenceBy','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','options','VoiceMailMessage','includeAll','include','rows','show','params','keys','find','create','catch','body','destroy','msg_id','Sequelize','VoiceMailMessage\x20not\x20found','audio/wav','attachment','Content-Disposition','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','sox','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','json','count','offset','limit','set'];(function(_0x41eb43,_0x89b588){var _0x3df7c7=function(_0x1ce054){while(--_0x1ce054){_0x41eb43['push'](_0x41eb43['shift']());}};_0x3df7c7(++_0x89b588);}(_0xe493,0x7e));var _0x3e49=function(_0x5b5844,_0x3e4c63){_0x5b5844=_0x5b5844-0x0;var _0x42c6c6=_0xe493[_0x5b5844];return _0x42c6c6;};'use strict';var pdf=require(_0x3e49('0x0'));var emlformat=require(_0x3e49('0x1'));var rimraf=require(_0x3e49('0x2'));var zipdir=require(_0x3e49('0x3'));var jsonpatch=require(_0x3e49('0x4'));var rp=require('request-promise');var moment=require(_0x3e49('0x5'));var BPromise=require(_0x3e49('0x6'));var Mustache=require('mustache');var util=require(_0x3e49('0x7'));var path=require('path');var sox=require(_0x3e49('0x8'));var csv=require(_0x3e49('0x9'));var ejs=require(_0x3e49('0xa'));var fs=require('fs');var _=require(_0x3e49('0xb'));var squel=require(_0x3e49('0xc'));var crypto=require(_0x3e49('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x3e49('0xe'));var Papa=require(_0x3e49('0xf'));var Redis=require(_0x3e49('0x10'));var authService=require(_0x3e49('0x11'));var qs=require(_0x3e49('0x12'));var as=require(_0x3e49('0x13'));var hardwareService=require(_0x3e49('0x14'));var logger=require(_0x3e49('0x15'))(_0x3e49('0x16'));var utils=require(_0x3e49('0x17'));var config=require(_0x3e49('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x50f523,_0x3c9410){_0x3c9410=_0x3c9410||0xcc;return function(_0x56114b){if(_0x56114b){return _0x50f523[_0x3e49('0x19')](_0x3c9410);}return _0x50f523[_0x3e49('0x1a')](_0x3c9410)['end']();};}function respondWithResult(_0x127335,_0x40504b){_0x40504b=_0x40504b||0xc8;return function(_0x54463c){if(_0x54463c){return _0x127335[_0x3e49('0x1a')](_0x40504b)[_0x3e49('0x1b')](_0x54463c);}};}function respondWithFilteredResult(_0x19cf9c,_0x238d1b){return function(_0x401e84){if(_0x401e84){var _0x3a9685=_0x401e84[_0x3e49('0x1c')],_0x46d813=_0x238d1b[_0x3e49('0x1d')],_0x469365=_0x238d1b[_0x3e49('0x1d')]+_0x238d1b[_0x3e49('0x1e')],_0x2b1f13;if(_0x469365>=_0x3a9685){_0x469365=_0x3a9685;_0x2b1f13=0xc8;}else{_0x2b1f13=0xce;}_0x19cf9c[_0x3e49('0x1a')](_0x2b1f13);return _0x19cf9c[_0x3e49('0x1f')]('Content-Range',_0x46d813+'-'+_0x469365+'/'+_0x3a9685)[_0x3e49('0x1b')](_0x401e84);}return null;};}function patchUpdates(_0x59bde3){return function(_0x2e160c){try{jsonpatch['apply'](_0x2e160c,_0x59bde3,!![]);}catch(_0x36f844){return BPromise['reject'](_0x36f844);}return _0x2e160c[_0x3e49('0x20')]();};}function saveUpdates(_0x1c51f7,_0x420d7b){return function(_0x5a4e67){if(_0x5a4e67){return _0x5a4e67[_0x3e49('0x21')](_0x1c51f7)['then'](function(_0xace209){return _0xace209;});}return null;};}function removeEntity(_0xa5b12b,_0x323be5){return function(_0x5e0f1d){if(_0x5e0f1d){return _0x5e0f1d['destroy']()[_0x3e49('0x22')](function(){_0xa5b12b['status'](0xcc)[_0x3e49('0x23')]();});}};}function handleEntityNotFound(_0x1b338b,_0x567d13){return function(_0x5b85df){if(!_0x5b85df){_0x1b338b[_0x3e49('0x19')](0x194);}return _0x5b85df;};}function handleError(_0x57706b,_0x285237){_0x285237=_0x285237||0x1f4;return function(_0x301eaa){logger[_0x3e49('0x24')](_0x301eaa[_0x3e49('0x25')]);if(_0x301eaa['name']){delete _0x301eaa[_0x3e49('0x26')];}_0x57706b[_0x3e49('0x1a')](_0x285237)[_0x3e49('0x27')](_0x301eaa);};}exports[_0x3e49('0x28')]=function(_0x4665b4,_0x36f5f2){var _0x151f66={},_0x264b6a={},_0xccffd9={'count':0x0,'rows':[]};var _0x572811=_['map'](db['VoiceMailMessage'][_0x3e49('0x29')],function(_0x366c78){return{'name':_0x366c78['fieldName'],'type':_0x366c78[_0x3e49('0x2a')]['key']};});_0x264b6a[_0x3e49('0x2b')]=_[_0x3e49('0x2c')](_[_0x3e49('0x2d')](_0x572811,_0x3e49('0x26')),['name']);_0x264b6a[_0x3e49('0x2e')]=_['keys'](_0x4665b4['query']);_0x264b6a[_0x3e49('0x2f')]=_[_0x3e49('0x30')](_0x264b6a[_0x3e49('0x2b')],_0x264b6a[_0x3e49('0x2e')]);_0x151f66[_0x3e49('0x31')]=_[_0x3e49('0x30')](_0x264b6a[_0x3e49('0x2b')],qs[_0x3e49('0x32')](_0x4665b4['query'][_0x3e49('0x32')]));_0x151f66[_0x3e49('0x31')]=_0x151f66[_0x3e49('0x31')][_0x3e49('0x33')]?_0x151f66[_0x3e49('0x31')]:_0x264b6a[_0x3e49('0x2b')];if(!_0x4665b4[_0x3e49('0x2e')][_0x3e49('0x34')](_0x3e49('0x35'))){_0x151f66[_0x3e49('0x1e')]=qs['limit'](_0x4665b4[_0x3e49('0x2e')][_0x3e49('0x1e')]);_0x151f66[_0x3e49('0x1d')]=qs[_0x3e49('0x1d')](_0x4665b4[_0x3e49('0x2e')][_0x3e49('0x1d')]);}_0x151f66[_0x3e49('0x36')]=qs[_0x3e49('0x37')](_0x4665b4[_0x3e49('0x2e')][_0x3e49('0x37')]);_0x151f66['where']=qs['filters'](_[_0x3e49('0x38')](_0x4665b4[_0x3e49('0x2e')],_0x264b6a[_0x3e49('0x2f')]),_0x572811);if(_0x4665b4[_0x3e49('0x2e')][_0x3e49('0x39')]){_0x151f66[_0x3e49('0x3a')]=_[_0x3e49('0x3b')](_0x151f66[_0x3e49('0x3a')],{'$or':_[_0x3e49('0x2d')](_0x572811,function(_0x4ae33e){if(_0x4ae33e['type']!=='VIRTUAL'){var _0x44c000={};_0x44c000[_0x4ae33e[_0x3e49('0x26')]]={'$like':'%'+_0x4665b4[_0x3e49('0x2e')][_0x3e49('0x39')]+'%'};return _0x44c000;}})});}_0x151f66=_['merge']({},_0x151f66,_0x4665b4[_0x3e49('0x3c')]);var _0x58c541={'where':_0x151f66['where']};return db[_0x3e49('0x3d')][_0x3e49('0x1c')](_0x58c541)[_0x3e49('0x22')](function(_0x3e9a1e){_0xccffd9[_0x3e49('0x1c')]=_0x3e9a1e;if(_0x4665b4[_0x3e49('0x2e')][_0x3e49('0x3e')]){_0x151f66[_0x3e49('0x3f')]=[{'all':!![]}];}return db['VoiceMailMessage']['findAll'](_0x151f66);})[_0x3e49('0x22')](function(_0xef6f76){_0xccffd9[_0x3e49('0x40')]=_0xef6f76;return _0xccffd9;})['then'](respondWithFilteredResult(_0x36f5f2,_0x151f66))['catch'](handleError(_0x36f5f2,null));};exports[_0x3e49('0x41')]=function(_0x3880ac,_0x221c5f){var _0xc81875={'raw':!![],'where':{'id':_0x3880ac[_0x3e49('0x42')]['id']}},_0x2f43f7={};_0x2f43f7[_0x3e49('0x2b')]=_[_0x3e49('0x43')](db[_0x3e49('0x3d')][_0x3e49('0x29')]);_0x2f43f7[_0x3e49('0x2e')]=_[_0x3e49('0x43')](_0x3880ac[_0x3e49('0x2e')]);_0x2f43f7[_0x3e49('0x2f')]=_[_0x3e49('0x30')](_0x2f43f7['model'],_0x2f43f7['query']);_0xc81875[_0x3e49('0x31')]=_[_0x3e49('0x30')](_0x2f43f7[_0x3e49('0x2b')],qs[_0x3e49('0x32')](_0x3880ac[_0x3e49('0x2e')]['fields']));_0xc81875['attributes']=_0xc81875['attributes']['length']?_0xc81875[_0x3e49('0x31')]:_0x2f43f7['model'];if(_0x3880ac[_0x3e49('0x2e')]['includeAll']){_0xc81875[_0x3e49('0x3f')]=[{'all':!![]}];}_0xc81875=_[_0x3e49('0x3b')]({},_0xc81875,_0x3880ac[_0x3e49('0x3c')]);return db[_0x3e49('0x3d')][_0x3e49('0x44')](_0xc81875)[_0x3e49('0x22')](handleEntityNotFound(_0x221c5f,null))[_0x3e49('0x22')](respondWithResult(_0x221c5f,null))['catch'](handleError(_0x221c5f,null));};exports[_0x3e49('0x45')]=function(_0x31e346,_0x430ea0){return db[_0x3e49('0x3d')][_0x3e49('0x45')](_0x31e346['body'],{})[_0x3e49('0x22')](respondWithResult(_0x430ea0,0xc9))[_0x3e49('0x46')](handleError(_0x430ea0,null));};exports['update']=function(_0x25185f,_0x390365){if(_0x25185f[_0x3e49('0x47')]['id']){delete _0x25185f[_0x3e49('0x47')]['id'];}return db[_0x3e49('0x3d')][_0x3e49('0x44')]({'where':{'id':_0x25185f[_0x3e49('0x42')]['id']}})['then'](handleEntityNotFound(_0x390365,null))[_0x3e49('0x22')](saveUpdates(_0x25185f[_0x3e49('0x47')],null))[_0x3e49('0x22')](respondWithResult(_0x390365,null))['catch'](handleError(_0x390365,null));};exports[_0x3e49('0x48')]=function(_0x5f3898,_0xb4c332){return db[_0x3e49('0x3d')]['find']({'where':{'id':_0x5f3898[_0x3e49('0x42')]['id']}})[_0x3e49('0x22')](handleEntityNotFound(_0xb4c332,null))[_0x3e49('0x22')](removeEntity(_0xb4c332,null))[_0x3e49('0x46')](handleError(_0xb4c332,null));};exports['download']=function(_0x12f7cb,_0x60015d,_0x4303ea){return db[_0x3e49('0x3d')]['find']({'where':{'id':_0x12f7cb[_0x3e49('0x42')]['id']},'attributes':['id','recording',_0x3e49('0x49')]})[_0x3e49('0x22')](handleEntityNotFound(_0x60015d,null))[_0x3e49('0x22')](function(_0x245479){if(_0x245479){if(!_0x245479['recording']){throw new db[(_0x3e49('0x4a'))]['ValidationError'](_0x3e49('0x4b'));}var _0x1d9a77={'Content-Type':_0x3e49('0x4c'),'Content-Disposition':_0x3e49('0x4d')};if(_0x245479[_0x3e49('0x49')]){_0x1d9a77[_0x3e49('0x4e')]='attachment;\x20filename=\x22'+_0x245479[_0x3e49('0x49')]+'.wav\x22';}_0x60015d[_0x3e49('0x1f')](_0x1d9a77);return _0x60015d[_0x3e49('0x27')](new Buffer(_0x245479['recording']));}})[_0x3e49('0x46')](handleError(_0x60015d,null));};
\ No newline at end of file
+var _0x034a=['type','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','filters','filter','where','merge','VIRTUAL','options','VoiceMailMessage','includeAll','findAll','rows','catch','params','include','find','create','update','body','download','recording','msg_id','Sequelize','ValidationError','audio/wav','attachment;\x20filename=\x22','.wav\x22','set','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','offset','undefined','limit','count','json','apply','reject','save','then','sendStatus','error','stack','name','send','index','map','rawAttributes','fieldName'];(function(_0xf950f,_0x6f0533){var _0x36947d=function(_0xce5f65){while(--_0xce5f65){_0xf950f['push'](_0xf950f['shift']());}};_0x36947d(++_0x6f0533);}(_0x034a,0x1c4));var _0xa034=function(_0x4d6954,_0x347932){_0x4d6954=_0x4d6954-0x0;var _0x34d870=_0x034a[_0x4d6954];return _0x34d870;};'use strict';var emlformat=require(_0xa034('0x0'));var rimraf=require(_0xa034('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xa034('0x2'));var rp=require(_0xa034('0x3'));var moment=require(_0xa034('0x4'));var BPromise=require(_0xa034('0x5'));var Mustache=require(_0xa034('0x6'));var util=require(_0xa034('0x7'));var path=require(_0xa034('0x8'));var sox=require(_0xa034('0x9'));var csv=require('to-csv');var ejs=require(_0xa034('0xa'));var fs=require('fs');var fs_extra=require(_0xa034('0xb'));var _=require(_0xa034('0xc'));var squel=require(_0xa034('0xd'));var crypto=require('crypto');var jsforce=require(_0xa034('0xe'));var deskjs=require(_0xa034('0xf'));var toCsv=require('to-csv');var querystring=require(_0xa034('0x10'));var Papa=require(_0xa034('0x11'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xa034('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa034('0x13'));var logger=require(_0xa034('0x14'))(_0xa034('0x15'));var utils=require(_0xa034('0x16'));var config=require(_0xa034('0x17'));var licenseUtil=require(_0xa034('0x18'));var db=require(_0xa034('0x19'))['db'];function respondWithStatusCode(_0x4ba094,_0x4fc715){_0x4fc715=_0x4fc715||0xcc;return function(_0x219c7f){if(_0x219c7f){return _0x4ba094['sendStatus'](_0x4fc715);}return _0x4ba094[_0xa034('0x1a')](_0x4fc715)[_0xa034('0x1b')]();};}function respondWithResult(_0x5a7df4,_0x9e10ac){_0x9e10ac=_0x9e10ac||0xc8;return function(_0x224b1b){if(_0x224b1b){return _0x5a7df4[_0xa034('0x1a')](_0x9e10ac)['json'](_0x224b1b);}};}function respondWithFilteredResult(_0x12e8b8,_0x379fa8){return function(_0x1277df){if(_0x1277df){var _0x3dc87e=typeof _0x379fa8[_0xa034('0x1c')]===_0xa034('0x1d')&&typeof _0x379fa8[_0xa034('0x1e')]===_0xa034('0x1d');var _0x329da8=_0x1277df[_0xa034('0x1f')];var _0x341652=_0x3dc87e?0x0:_0x379fa8[_0xa034('0x1c')];var _0x36c037=_0x3dc87e?_0x1277df[_0xa034('0x1f')]:_0x379fa8['offset']+_0x379fa8[_0xa034('0x1e')];var _0x22e37c;if(_0x36c037>=_0x329da8){_0x36c037=_0x329da8;_0x22e37c=0xc8;}else{_0x22e37c=0xce;}_0x12e8b8[_0xa034('0x1a')](_0x22e37c);return _0x12e8b8['set']('Content-Range',_0x341652+'-'+_0x36c037+'/'+_0x329da8)[_0xa034('0x20')](_0x1277df);}return null;};}function patchUpdates(_0x58fd28){return function(_0x3b56a6){try{jsonpatch[_0xa034('0x21')](_0x3b56a6,_0x58fd28,!![]);}catch(_0x410671){return BPromise[_0xa034('0x22')](_0x410671);}return _0x3b56a6[_0xa034('0x23')]();};}function saveUpdates(_0x11885f,_0x21c716){return function(_0xf2c03){if(_0xf2c03){return _0xf2c03['update'](_0x11885f)[_0xa034('0x24')](function(_0x241f62){return _0x241f62;});}return null;};}function removeEntity(_0x37a3d8,_0x37e4c6){return function(_0x49ae75){if(_0x49ae75){return _0x49ae75['destroy']()[_0xa034('0x24')](function(){_0x37a3d8[_0xa034('0x1a')](0xcc)[_0xa034('0x1b')]();});}};}function handleEntityNotFound(_0x5dfb99,_0xf5cb1d){return function(_0x211608){if(!_0x211608){_0x5dfb99[_0xa034('0x25')](0x194);}return _0x211608;};}function handleError(_0x7efdef,_0x1433bf){_0x1433bf=_0x1433bf||0x1f4;return function(_0x2d38fd){logger[_0xa034('0x26')](_0x2d38fd[_0xa034('0x27')]);if(_0x2d38fd[_0xa034('0x28')]){delete _0x2d38fd[_0xa034('0x28')];}_0x7efdef['status'](_0x1433bf)[_0xa034('0x29')](_0x2d38fd);};}exports[_0xa034('0x2a')]=function(_0xbdaa67,_0x370a4b){var _0xf3c3ee={},_0x3ccdec={},_0x44588e={'count':0x0,'rows':[]};var _0x2a3767=_[_0xa034('0x2b')](db['VoiceMailMessage'][_0xa034('0x2c')],function(_0x244b5e){return{'name':_0x244b5e[_0xa034('0x2d')],'type':_0x244b5e[_0xa034('0x2e')]['key']};});_0x3ccdec[_0xa034('0x2f')]=_['differenceBy'](_[_0xa034('0x2b')](_0x2a3767,_0xa034('0x28')),['name']);_0x3ccdec['query']=_[_0xa034('0x30')](_0xbdaa67[_0xa034('0x31')]);_0x3ccdec['filters']=_[_0xa034('0x32')](_0x3ccdec['model'],_0x3ccdec[_0xa034('0x31')]);_0xf3c3ee[_0xa034('0x33')]=_[_0xa034('0x32')](_0x3ccdec[_0xa034('0x2f')],qs[_0xa034('0x34')](_0xbdaa67['query']['fields']));_0xf3c3ee[_0xa034('0x33')]=_0xf3c3ee[_0xa034('0x33')][_0xa034('0x35')]?_0xf3c3ee[_0xa034('0x33')]:_0x3ccdec[_0xa034('0x2f')];if(!_0xbdaa67[_0xa034('0x31')][_0xa034('0x36')]('nolimit')){_0xf3c3ee[_0xa034('0x1e')]=qs['limit'](_0xbdaa67[_0xa034('0x31')][_0xa034('0x1e')]);_0xf3c3ee['offset']=qs[_0xa034('0x1c')](_0xbdaa67[_0xa034('0x31')]['offset']);}_0xf3c3ee[_0xa034('0x37')]=qs[_0xa034('0x38')](_0xbdaa67[_0xa034('0x31')][_0xa034('0x38')]);_0xf3c3ee['where']=qs[_0xa034('0x39')](_['pick'](_0xbdaa67['query'],_0x3ccdec[_0xa034('0x39')]),_0x2a3767);if(_0xbdaa67[_0xa034('0x31')][_0xa034('0x3a')]){_0xf3c3ee[_0xa034('0x3b')]=_[_0xa034('0x3c')](_0xf3c3ee['where'],{'$or':_[_0xa034('0x2b')](_0x2a3767,function(_0x4fa7d3){if(_0x4fa7d3[_0xa034('0x2e')]!==_0xa034('0x3d')){var _0x34e561={};_0x34e561[_0x4fa7d3['name']]={'$like':'%'+_0xbdaa67[_0xa034('0x31')][_0xa034('0x3a')]+'%'};return _0x34e561;}})});}_0xf3c3ee=_[_0xa034('0x3c')]({},_0xf3c3ee,_0xbdaa67[_0xa034('0x3e')]);var _0x1f10b1={'where':_0xf3c3ee[_0xa034('0x3b')]};return db[_0xa034('0x3f')][_0xa034('0x1f')](_0x1f10b1)[_0xa034('0x24')](function(_0x52c951){_0x44588e['count']=_0x52c951;if(_0xbdaa67['query'][_0xa034('0x40')]){_0xf3c3ee['include']=[{'all':!![]}];}return db[_0xa034('0x3f')][_0xa034('0x41')](_0xf3c3ee);})[_0xa034('0x24')](function(_0x3ba4f2){_0x44588e[_0xa034('0x42')]=_0x3ba4f2;return _0x44588e;})['then'](respondWithFilteredResult(_0x370a4b,_0xf3c3ee))[_0xa034('0x43')](handleError(_0x370a4b,null));};exports['show']=function(_0x456ad5,_0x5b6daf){var _0x5f02b1={'raw':!![],'where':{'id':_0x456ad5[_0xa034('0x44')]['id']}},_0x22a7d9={};_0x22a7d9[_0xa034('0x2f')]=_['keys'](db[_0xa034('0x3f')][_0xa034('0x2c')]);_0x22a7d9[_0xa034('0x31')]=_['keys'](_0x456ad5[_0xa034('0x31')]);_0x22a7d9['filters']=_[_0xa034('0x32')](_0x22a7d9[_0xa034('0x2f')],_0x22a7d9['query']);_0x5f02b1[_0xa034('0x33')]=_[_0xa034('0x32')](_0x22a7d9[_0xa034('0x2f')],qs['fields'](_0x456ad5[_0xa034('0x31')][_0xa034('0x34')]));_0x5f02b1[_0xa034('0x33')]=_0x5f02b1[_0xa034('0x33')][_0xa034('0x35')]?_0x5f02b1['attributes']:_0x22a7d9['model'];if(_0x456ad5['query'][_0xa034('0x40')]){_0x5f02b1[_0xa034('0x45')]=[{'all':!![]}];}_0x5f02b1=_[_0xa034('0x3c')]({},_0x5f02b1,_0x456ad5[_0xa034('0x3e')]);return db[_0xa034('0x3f')][_0xa034('0x46')](_0x5f02b1)[_0xa034('0x24')](handleEntityNotFound(_0x5b6daf,null))[_0xa034('0x24')](respondWithResult(_0x5b6daf,null))['catch'](handleError(_0x5b6daf,null));};exports[_0xa034('0x47')]=function(_0x14e95b,_0x56d195){return db['VoiceMailMessage'][_0xa034('0x47')](_0x14e95b['body'],{})['then'](respondWithResult(_0x56d195,0xc9))[_0xa034('0x43')](handleError(_0x56d195,null));};exports[_0xa034('0x48')]=function(_0x578d23,_0x2f56ba){if(_0x578d23[_0xa034('0x49')]['id']){delete _0x578d23['body']['id'];}return db[_0xa034('0x3f')]['find']({'where':{'id':_0x578d23[_0xa034('0x44')]['id']}})[_0xa034('0x24')](handleEntityNotFound(_0x2f56ba,null))[_0xa034('0x24')](saveUpdates(_0x578d23[_0xa034('0x49')],null))[_0xa034('0x24')](respondWithResult(_0x2f56ba,null))['catch'](handleError(_0x2f56ba,null));};exports['destroy']=function(_0x52a07b,_0xc7cce0){return db[_0xa034('0x3f')][_0xa034('0x46')]({'where':{'id':_0x52a07b[_0xa034('0x44')]['id']}})['then'](handleEntityNotFound(_0xc7cce0,null))['then'](removeEntity(_0xc7cce0,null))[_0xa034('0x43')](handleError(_0xc7cce0,null));};exports[_0xa034('0x4a')]=function(_0x4fe2c0,_0x216f35,_0x3deadf){return db[_0xa034('0x3f')]['find']({'where':{'id':_0x4fe2c0['params']['id']},'attributes':['id',_0xa034('0x4b'),_0xa034('0x4c')]})['then'](handleEntityNotFound(_0x216f35,null))[_0xa034('0x24')](function(_0x4faf9d){if(_0x4faf9d){if(!_0x4faf9d[_0xa034('0x4b')]){throw new db[(_0xa034('0x4d'))][(_0xa034('0x4e'))]('VoiceMailMessage\x20not\x20found');}var _0x1ea522={'Content-Type':_0xa034('0x4f'),'Content-Disposition':'attachment'};if(_0x4faf9d[_0xa034('0x4c')]){_0x1ea522['Content-Disposition']=_0xa034('0x50')+_0x4faf9d[_0xa034('0x4c')]+_0xa034('0x51');}_0x216f35[_0xa034('0x52')](_0x1ea522);return _0x216f35['send'](new Buffer(_0x4faf9d[_0xa034('0x4b')]));}})[_0xa034('0x43')](handleError(_0x216f35,null));};
\ No newline at end of file