Built motion from commit e1760111.|2.6.18
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index 8abc86d..4f53c6f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaba6=['ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','json','count','offset','set','Content-Range','save','update','then','destroy','end','error','stack','name','send','map','rawAttributes','fieldName','type','key','differenceBy','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','limit','order','sort','pick','filter','where','VIRTUAL','merge','options','VoiceMailMessage','includeAll','include','findAll','show','params','keys','find','create','body','catch','download','recording','msg_id','ValidationError','VoiceMailMessage\x20not\x20found','audio/wav','attachment','Content-Disposition','attachment;\x20filename=\x22','html-pdf','eml-format','moment','bluebird','util','path','lodash','crypto','jsforce','to-csv','querystring'];(function(_0x4c74e7,_0x1732a1){var _0x3efe40=function(_0x5036a5){while(--_0x5036a5){_0x4c74e7['push'](_0x4c74e7['shift']());}};_0x3efe40(++_0x1732a1);}(_0xaba6,0xe2));var _0x6aba=function(_0x400497,_0x1b51ab){_0x400497=_0x400497-0x0;var _0x50dc18=_0xaba6[_0x400497];return _0x50dc18;};'use strict';var pdf=require(_0x6aba('0x0'));var emlformat=require(_0x6aba('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x6aba('0x2'));var BPromise=require(_0x6aba('0x3'));var Mustache=require('mustache');var util=require(_0x6aba('0x4'));var path=require(_0x6aba('0x5'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x6aba('0x6'));var squel=require('squel');var crypto=require(_0x6aba('0x7'));var jsforce=require(_0x6aba('0x8'));var deskjs=require('desk.js');var toCsv=require(_0x6aba('0x9'));var querystring=require(_0x6aba('0xa'));var Papa=require('papaparse');var Redis=require(_0x6aba('0xb'));var authService=require(_0x6aba('0xc'));var qs=require(_0x6aba('0xd'));var as=require(_0x6aba('0xe'));var hardwareService=require(_0x6aba('0xf'));var logger=require(_0x6aba('0x10'))(_0x6aba('0x11'));var utils=require('../../config/utils');var config=require(_0x6aba('0x12'));var db=require(_0x6aba('0x13'))['db'];function respondWithStatusCode(_0x43867b,_0x254007){_0x254007=_0x254007||0xcc;return function(_0x53e604){if(_0x53e604){return _0x43867b[_0x6aba('0x14')](_0x254007);}return _0x43867b[_0x6aba('0x15')](_0x254007)['end']();};}function respondWithResult(_0x123575,_0x2934c3){_0x2934c3=_0x2934c3||0xc8;return function(_0x252574){if(_0x252574){return _0x123575['status'](_0x2934c3)[_0x6aba('0x16')](_0x252574);}};}function respondWithFilteredResult(_0x1f3035,_0x15d236){return function(_0x4ae616){if(_0x4ae616){var _0x117235=_0x4ae616[_0x6aba('0x17')],_0xe0c63f=_0x15d236[_0x6aba('0x18')],_0xa3cb32=_0x15d236[_0x6aba('0x18')]+_0x15d236['limit'],_0x21921d;if(_0xa3cb32>=_0x117235){_0xa3cb32=_0x117235;_0x21921d=0xc8;}else{_0x21921d=0xce;}_0x1f3035[_0x6aba('0x15')](_0x21921d);return _0x1f3035[_0x6aba('0x19')](_0x6aba('0x1a'),_0xe0c63f+'-'+_0xa3cb32+'/'+_0x117235)['json'](_0x4ae616);}return null;};}function patchUpdates(_0x1d6ad4){return function(_0x4b0ed4){try{jsonpatch['apply'](_0x4b0ed4,_0x1d6ad4,!![]);}catch(_0x23762e){return BPromise['reject'](_0x23762e);}return _0x4b0ed4[_0x6aba('0x1b')]();};}function saveUpdates(_0x1881ae,_0x37b275){return function(_0xb2f624){if(_0xb2f624){return _0xb2f624[_0x6aba('0x1c')](_0x1881ae)[_0x6aba('0x1d')](function(_0x362a10){return _0x362a10;});}return null;};}function removeEntity(_0x5953f2,_0x2e5f65){return function(_0x41464f){if(_0x41464f){return _0x41464f[_0x6aba('0x1e')]()[_0x6aba('0x1d')](function(){_0x5953f2[_0x6aba('0x15')](0xcc)[_0x6aba('0x1f')]();});}};}function handleEntityNotFound(_0x44f723,_0x67ba6e){return function(_0x2b02c5){if(!_0x2b02c5){_0x44f723[_0x6aba('0x14')](0x194);}return _0x2b02c5;};}function handleError(_0x31ec71,_0x3e18e3){_0x3e18e3=_0x3e18e3||0x1f4;return function(_0x24d1ad){logger[_0x6aba('0x20')](_0x24d1ad[_0x6aba('0x21')]);if(_0x24d1ad[_0x6aba('0x22')]){delete _0x24d1ad[_0x6aba('0x22')];}_0x31ec71[_0x6aba('0x15')](_0x3e18e3)[_0x6aba('0x23')](_0x24d1ad);};}exports['index']=function(_0x50e864,_0x335e82){var _0x5b0845={},_0x30ecf9={},_0x108ff1={'count':0x0,'rows':[]};var _0x3ca593=_[_0x6aba('0x24')](db['VoiceMailMessage'][_0x6aba('0x25')],function(_0x1fcec2){return{'name':_0x1fcec2[_0x6aba('0x26')],'type':_0x1fcec2[_0x6aba('0x27')][_0x6aba('0x28')]};});_0x30ecf9['model']=_[_0x6aba('0x29')](_['map'](_0x3ca593,_0x6aba('0x22')),[_0x6aba('0x22')]);_0x30ecf9['query']=_['keys'](_0x50e864[_0x6aba('0x2a')]);_0x30ecf9[_0x6aba('0x2b')]=_[_0x6aba('0x2c')](_0x30ecf9[_0x6aba('0x2d')],_0x30ecf9[_0x6aba('0x2a')]);_0x5b0845[_0x6aba('0x2e')]=_[_0x6aba('0x2c')](_0x30ecf9['model'],qs[_0x6aba('0x2f')](_0x50e864[_0x6aba('0x2a')][_0x6aba('0x2f')]));_0x5b0845['attributes']=_0x5b0845[_0x6aba('0x2e')][_0x6aba('0x30')]?_0x5b0845[_0x6aba('0x2e')]:_0x30ecf9['model'];if(!_0x50e864[_0x6aba('0x2a')][_0x6aba('0x31')]('nolimit')){_0x5b0845[_0x6aba('0x32')]=qs['limit'](_0x50e864[_0x6aba('0x2a')]['limit']);_0x5b0845[_0x6aba('0x18')]=qs[_0x6aba('0x18')](_0x50e864['query']['offset']);}_0x5b0845[_0x6aba('0x33')]=qs['sort'](_0x50e864[_0x6aba('0x2a')][_0x6aba('0x34')]);_0x5b0845['where']=qs[_0x6aba('0x2b')](_[_0x6aba('0x35')](_0x50e864[_0x6aba('0x2a')],_0x30ecf9[_0x6aba('0x2b')]));if(_0x50e864[_0x6aba('0x2a')][_0x6aba('0x36')]){_0x5b0845[_0x6aba('0x37')]=_['merge'](_0x5b0845['where'],{'$or':_[_0x6aba('0x24')](_0x3ca593,function(_0x4880a3){if(_0x4880a3[_0x6aba('0x27')]!==_0x6aba('0x38')){var _0x3b6276={};_0x3b6276[_0x4880a3['name']]={'$like':'%'+_0x50e864[_0x6aba('0x2a')][_0x6aba('0x36')]+'%'};return _0x3b6276;}})});}_0x5b0845=_[_0x6aba('0x39')]({},_0x5b0845,_0x50e864[_0x6aba('0x3a')]);var _0x1bd3f3={'where':_0x5b0845[_0x6aba('0x37')]};return db[_0x6aba('0x3b')][_0x6aba('0x17')](_0x1bd3f3)[_0x6aba('0x1d')](function(_0x550d00){_0x108ff1[_0x6aba('0x17')]=_0x550d00;if(_0x50e864[_0x6aba('0x2a')][_0x6aba('0x3c')]){_0x5b0845[_0x6aba('0x3d')]=[{'all':!![]}];}return db['VoiceMailMessage'][_0x6aba('0x3e')](_0x5b0845);})['then'](function(_0x34f899){_0x108ff1['rows']=_0x34f899;return _0x108ff1;})['then'](respondWithFilteredResult(_0x335e82,_0x5b0845))['catch'](handleError(_0x335e82,null));};exports[_0x6aba('0x3f')]=function(_0x5a8b22,_0x197f0f){var _0x3263a9={'raw':!![],'where':{'id':_0x5a8b22[_0x6aba('0x40')]['id']}},_0x291983={};_0x291983[_0x6aba('0x2d')]=_[_0x6aba('0x41')](db[_0x6aba('0x3b')]['rawAttributes']);_0x291983[_0x6aba('0x2a')]=_[_0x6aba('0x41')](_0x5a8b22[_0x6aba('0x2a')]);_0x291983['filters']=_['intersection'](_0x291983[_0x6aba('0x2d')],_0x291983[_0x6aba('0x2a')]);_0x3263a9[_0x6aba('0x2e')]=_[_0x6aba('0x2c')](_0x291983[_0x6aba('0x2d')],qs['fields'](_0x5a8b22[_0x6aba('0x2a')][_0x6aba('0x2f')]));_0x3263a9[_0x6aba('0x2e')]=_0x3263a9[_0x6aba('0x2e')][_0x6aba('0x30')]?_0x3263a9[_0x6aba('0x2e')]:_0x291983[_0x6aba('0x2d')];if(_0x5a8b22['query'][_0x6aba('0x3c')]){_0x3263a9[_0x6aba('0x3d')]=[{'all':!![]}];}_0x3263a9=_[_0x6aba('0x39')]({},_0x3263a9,_0x5a8b22[_0x6aba('0x3a')]);return db[_0x6aba('0x3b')][_0x6aba('0x42')](_0x3263a9)['then'](handleEntityNotFound(_0x197f0f,null))[_0x6aba('0x1d')](respondWithResult(_0x197f0f,null))['catch'](handleError(_0x197f0f,null));};exports['create']=function(_0x2609d4,_0x25d6a4){return db[_0x6aba('0x3b')][_0x6aba('0x43')](_0x2609d4[_0x6aba('0x44')],{})[_0x6aba('0x1d')](respondWithResult(_0x25d6a4,0xc9))[_0x6aba('0x45')](handleError(_0x25d6a4,null));};exports[_0x6aba('0x1c')]=function(_0x109b5d,_0x1b0601){if(_0x109b5d['body']['id']){delete _0x109b5d[_0x6aba('0x44')]['id'];}return db[_0x6aba('0x3b')][_0x6aba('0x42')]({'where':{'id':_0x109b5d[_0x6aba('0x40')]['id']}})[_0x6aba('0x1d')](handleEntityNotFound(_0x1b0601,null))[_0x6aba('0x1d')](saveUpdates(_0x109b5d[_0x6aba('0x44')],null))[_0x6aba('0x1d')](respondWithResult(_0x1b0601,null))[_0x6aba('0x45')](handleError(_0x1b0601,null));};exports[_0x6aba('0x1e')]=function(_0x24f87c,_0xd4afa2){return db[_0x6aba('0x3b')]['find']({'where':{'id':_0x24f87c[_0x6aba('0x40')]['id']}})[_0x6aba('0x1d')](handleEntityNotFound(_0xd4afa2,null))[_0x6aba('0x1d')](removeEntity(_0xd4afa2,null))['catch'](handleError(_0xd4afa2,null));};exports[_0x6aba('0x46')]=function(_0x5476ec,_0x56737e,_0x24f0c3){return db[_0x6aba('0x3b')][_0x6aba('0x42')]({'where':{'id':_0x5476ec['params']['id']},'attributes':['id',_0x6aba('0x47'),_0x6aba('0x48')]})[_0x6aba('0x1d')](handleEntityNotFound(_0x56737e,null))[_0x6aba('0x1d')](function(_0x2cd83d){if(_0x2cd83d){if(!_0x2cd83d[_0x6aba('0x47')]){throw new db['Sequelize'][(_0x6aba('0x49'))](_0x6aba('0x4a'));}var _0x48145d={'Content-Type':_0x6aba('0x4b'),'Content-Disposition':_0x6aba('0x4c')};if(_0x2cd83d[_0x6aba('0x48')]){_0x48145d[_0x6aba('0x4d')]=_0x6aba('0x4e')+_0x2cd83d[_0x6aba('0x48')]+'.wav\x22';}_0x56737e['set'](_0x48145d);return _0x56737e[_0x6aba('0x23')](new Buffer(_0x2cd83d[_0x6aba('0x47')]));}})['catch'](handleError(_0x56737e,null));};
\ No newline at end of file
+var _0x21f7=['save','update','destroy','then','error','stack','name','send','index','map','rawAttributes','key','model','differenceBy','query','filters','intersection','attributes','fields','length','hasOwnProperty','offset','sort','where','pick','filter','merge','type','VIRTUAL','includeAll','VoiceMailMessage','findAll','rows','catch','show','params','keys','include','find','create','body','download','recording','msg_id','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','attachment','attachment;\x20filename=\x22','.wav\x22','eml-format','zip-dir','fast-json-patch','moment','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','status','json','undefined','limit','count','set','Content-Range'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0x21f7,0x85));var _0x721f=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x21f7[_0x2dafbe];return _0x58a45a;};'use strict';var emlformat=require(_0x721f('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x721f('0x1'));var jsonpatch=require(_0x721f('0x2'));var rp=require('request-promise');var moment=require(_0x721f('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x721f('0x4'));var sox=require(_0x721f('0x5'));var csv=require(_0x721f('0x6'));var ejs=require(_0x721f('0x7'));var fs=require('fs');var fs_extra=require(_0x721f('0x8'));var _=require(_0x721f('0x9'));var squel=require(_0x721f('0xa'));var crypto=require(_0x721f('0xb'));var jsforce=require(_0x721f('0xc'));var deskjs=require(_0x721f('0xd'));var toCsv=require(_0x721f('0x6'));var querystring=require(_0x721f('0xe'));var Papa=require(_0x721f('0xf'));var Redis=require(_0x721f('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x721f('0x11'));var as=require(_0x721f('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x721f('0x13'))(_0x721f('0x14'));var utils=require(_0x721f('0x15'));var config=require(_0x721f('0x16'));var licenseUtil=require(_0x721f('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2b9780,_0x4d398f){_0x4d398f=_0x4d398f||0xcc;return function(_0x635e23){if(_0x635e23){return _0x2b9780[_0x721f('0x18')](_0x4d398f);}return _0x2b9780['status'](_0x4d398f)[_0x721f('0x19')]();};}function respondWithResult(_0x4a7ac3,_0x4d2015){_0x4d2015=_0x4d2015||0xc8;return function(_0x3d9462){if(_0x3d9462){return _0x4a7ac3[_0x721f('0x1a')](_0x4d2015)[_0x721f('0x1b')](_0x3d9462);}};}function respondWithFilteredResult(_0x48a7b5,_0x429ed7){return function(_0x2d970f){if(_0x2d970f){var _0x19f37c=typeof _0x429ed7['offset']===_0x721f('0x1c')&&typeof _0x429ed7[_0x721f('0x1d')]===_0x721f('0x1c');var _0x39b529=_0x2d970f[_0x721f('0x1e')];var _0x16ee1a=_0x19f37c?0x0:_0x429ed7['offset'];var _0x4ee391=_0x19f37c?_0x2d970f[_0x721f('0x1e')]:_0x429ed7['offset']+_0x429ed7[_0x721f('0x1d')];var _0x585c37;if(_0x4ee391>=_0x39b529){_0x4ee391=_0x39b529;_0x585c37=0xc8;}else{_0x585c37=0xce;}_0x48a7b5[_0x721f('0x1a')](_0x585c37);return _0x48a7b5[_0x721f('0x1f')](_0x721f('0x20'),_0x16ee1a+'-'+_0x4ee391+'/'+_0x39b529)['json'](_0x2d970f);}return null;};}function patchUpdates(_0x146b04){return function(_0x524ebd){try{jsonpatch['apply'](_0x524ebd,_0x146b04,!![]);}catch(_0x14d1a0){return BPromise['reject'](_0x14d1a0);}return _0x524ebd[_0x721f('0x21')]();};}function saveUpdates(_0x379f03,_0x5bb902){return function(_0x32dcd9){if(_0x32dcd9){return _0x32dcd9[_0x721f('0x22')](_0x379f03)['then'](function(_0x52fe45){return _0x52fe45;});}return null;};}function removeEntity(_0x4449c6,_0x4956fa){return function(_0x5c6293){if(_0x5c6293){return _0x5c6293[_0x721f('0x23')]()[_0x721f('0x24')](function(){_0x4449c6[_0x721f('0x1a')](0xcc)[_0x721f('0x19')]();});}};}function handleEntityNotFound(_0x531cd8,_0x2ad074){return function(_0x2b04d4){if(!_0x2b04d4){_0x531cd8['sendStatus'](0x194);}return _0x2b04d4;};}function handleError(_0x5a5e68,_0x4e5cdd){_0x4e5cdd=_0x4e5cdd||0x1f4;return function(_0x5b9ac0){logger[_0x721f('0x25')](_0x5b9ac0[_0x721f('0x26')]);if(_0x5b9ac0[_0x721f('0x27')]){delete _0x5b9ac0['name'];}_0x5a5e68[_0x721f('0x1a')](_0x4e5cdd)[_0x721f('0x28')](_0x5b9ac0);};}exports[_0x721f('0x29')]=function(_0x387b45,_0x48a89d){var _0x3db25f={},_0x2b7273={},_0x408fc9={'count':0x0,'rows':[]};var _0x1611f2=_[_0x721f('0x2a')](db['VoiceMailMessage'][_0x721f('0x2b')],function(_0x182774){return{'name':_0x182774['fieldName'],'type':_0x182774['type'][_0x721f('0x2c')]};});_0x2b7273[_0x721f('0x2d')]=_[_0x721f('0x2e')](_[_0x721f('0x2a')](_0x1611f2,_0x721f('0x27')),[_0x721f('0x27')]);_0x2b7273[_0x721f('0x2f')]=_['keys'](_0x387b45[_0x721f('0x2f')]);_0x2b7273[_0x721f('0x30')]=_[_0x721f('0x31')](_0x2b7273[_0x721f('0x2d')],_0x2b7273[_0x721f('0x2f')]);_0x3db25f[_0x721f('0x32')]=_[_0x721f('0x31')](_0x2b7273['model'],qs[_0x721f('0x33')](_0x387b45[_0x721f('0x2f')][_0x721f('0x33')]));_0x3db25f['attributes']=_0x3db25f[_0x721f('0x32')][_0x721f('0x34')]?_0x3db25f[_0x721f('0x32')]:_0x2b7273['model'];if(!_0x387b45[_0x721f('0x2f')][_0x721f('0x35')]('nolimit')){_0x3db25f[_0x721f('0x1d')]=qs[_0x721f('0x1d')](_0x387b45[_0x721f('0x2f')]['limit']);_0x3db25f[_0x721f('0x36')]=qs[_0x721f('0x36')](_0x387b45['query'][_0x721f('0x36')]);}_0x3db25f['order']=qs[_0x721f('0x37')](_0x387b45[_0x721f('0x2f')][_0x721f('0x37')]);_0x3db25f[_0x721f('0x38')]=qs[_0x721f('0x30')](_[_0x721f('0x39')](_0x387b45['query'],_0x2b7273['filters']),_0x1611f2);if(_0x387b45[_0x721f('0x2f')][_0x721f('0x3a')]){_0x3db25f['where']=_[_0x721f('0x3b')](_0x3db25f[_0x721f('0x38')],{'$or':_['map'](_0x1611f2,function(_0x3a8a9b){if(_0x3a8a9b[_0x721f('0x3c')]!==_0x721f('0x3d')){var _0x2a7c05={};_0x2a7c05[_0x3a8a9b[_0x721f('0x27')]]={'$like':'%'+_0x387b45[_0x721f('0x2f')][_0x721f('0x3a')]+'%'};return _0x2a7c05;}})});}_0x3db25f=_['merge']({},_0x3db25f,_0x387b45['options']);var _0x1daaf7={'where':_0x3db25f[_0x721f('0x38')]};return db['VoiceMailMessage'][_0x721f('0x1e')](_0x1daaf7)[_0x721f('0x24')](function(_0x46c50e){_0x408fc9[_0x721f('0x1e')]=_0x46c50e;if(_0x387b45[_0x721f('0x2f')][_0x721f('0x3e')]){_0x3db25f['include']=[{'all':!![]}];}return db[_0x721f('0x3f')][_0x721f('0x40')](_0x3db25f);})[_0x721f('0x24')](function(_0xc4862a){_0x408fc9[_0x721f('0x41')]=_0xc4862a;return _0x408fc9;})[_0x721f('0x24')](respondWithFilteredResult(_0x48a89d,_0x3db25f))[_0x721f('0x42')](handleError(_0x48a89d,null));};exports[_0x721f('0x43')]=function(_0x217b59,_0x45d391){var _0x531a00={'raw':!![],'where':{'id':_0x217b59[_0x721f('0x44')]['id']}},_0x5caf58={};_0x5caf58[_0x721f('0x2d')]=_[_0x721f('0x45')](db[_0x721f('0x3f')][_0x721f('0x2b')]);_0x5caf58[_0x721f('0x2f')]=_[_0x721f('0x45')](_0x217b59[_0x721f('0x2f')]);_0x5caf58[_0x721f('0x30')]=_[_0x721f('0x31')](_0x5caf58['model'],_0x5caf58[_0x721f('0x2f')]);_0x531a00['attributes']=_['intersection'](_0x5caf58['model'],qs[_0x721f('0x33')](_0x217b59[_0x721f('0x2f')][_0x721f('0x33')]));_0x531a00['attributes']=_0x531a00[_0x721f('0x32')][_0x721f('0x34')]?_0x531a00['attributes']:_0x5caf58['model'];if(_0x217b59[_0x721f('0x2f')][_0x721f('0x3e')]){_0x531a00[_0x721f('0x46')]=[{'all':!![]}];}_0x531a00=_[_0x721f('0x3b')]({},_0x531a00,_0x217b59['options']);return db[_0x721f('0x3f')][_0x721f('0x47')](_0x531a00)['then'](handleEntityNotFound(_0x45d391,null))[_0x721f('0x24')](respondWithResult(_0x45d391,null))[_0x721f('0x42')](handleError(_0x45d391,null));};exports[_0x721f('0x48')]=function(_0x342f04,_0x14b0da){return db[_0x721f('0x3f')]['create'](_0x342f04['body'],{})[_0x721f('0x24')](respondWithResult(_0x14b0da,0xc9))[_0x721f('0x42')](handleError(_0x14b0da,null));};exports[_0x721f('0x22')]=function(_0x1da00b,_0x263a58){if(_0x1da00b[_0x721f('0x49')]['id']){delete _0x1da00b[_0x721f('0x49')]['id'];}return db[_0x721f('0x3f')][_0x721f('0x47')]({'where':{'id':_0x1da00b[_0x721f('0x44')]['id']}})[_0x721f('0x24')](handleEntityNotFound(_0x263a58,null))[_0x721f('0x24')](saveUpdates(_0x1da00b[_0x721f('0x49')],null))['then'](respondWithResult(_0x263a58,null))[_0x721f('0x42')](handleError(_0x263a58,null));};exports['destroy']=function(_0x2d36be,_0x503844){return db['VoiceMailMessage'][_0x721f('0x47')]({'where':{'id':_0x2d36be[_0x721f('0x44')]['id']}})[_0x721f('0x24')](handleEntityNotFound(_0x503844,null))[_0x721f('0x24')](removeEntity(_0x503844,null))['catch'](handleError(_0x503844,null));};exports[_0x721f('0x4a')]=function(_0xb2b6a4,_0x32f5f6,_0x348560){return db['VoiceMailMessage']['find']({'where':{'id':_0xb2b6a4[_0x721f('0x44')]['id']},'attributes':['id',_0x721f('0x4b'),_0x721f('0x4c')]})[_0x721f('0x24')](handleEntityNotFound(_0x32f5f6,null))[_0x721f('0x24')](function(_0x41bab9){if(_0x41bab9){if(!_0x41bab9[_0x721f('0x4b')]){throw new db[(_0x721f('0x4d'))][(_0x721f('0x4e'))](_0x721f('0x4f'));}var _0x1f9bf3={'Content-Type':'audio/wav','Content-Disposition':_0x721f('0x50')};if(_0x41bab9[_0x721f('0x4c')]){_0x1f9bf3['Content-Disposition']=_0x721f('0x51')+_0x41bab9['msg_id']+_0x721f('0x52');}_0x32f5f6[_0x721f('0x1f')](_0x1f9bf3);return _0x32f5f6['send'](new Buffer(_0x41bab9[_0x721f('0x4b')]));}})[_0x721f('0x42')](handleError(_0x32f5f6,null));};
\ No newline at end of file