Built motion from commit e1760111.|2.6.18
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index 1ef7616..4f53c6f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1b59=['order','sort','where','filters','filter','VIRTUAL','merge','options','includeAll','findAll','catch','show','params','keys','include','create','body','find','download','recording','msg_id','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','audio/wav','attachment','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','error','stack','name','send','index','VoiceMailMessage','rawAttributes','fieldName','type','key','model','differenceBy','map','query','intersection','attributes','fields','length','hasOwnProperty'];(function(_0x5c634b,_0x39cb67){var _0x1844d7=function(_0x478c88){while(--_0x478c88){_0x5c634b['push'](_0x5c634b['shift']());}};_0x1844d7(++_0x39cb67);}(_0x1b59,0x11f));var _0x91b5=function(_0x5e39d0,_0x15516e){_0x5e39d0=_0x5e39d0-0x0;var _0xfd2079=_0x1b59[_0x5e39d0];return _0xfd2079;};'use strict';var emlformat=require(_0x91b5('0x0'));var rimraf=require(_0x91b5('0x1'));var zipdir=require(_0x91b5('0x2'));var jsonpatch=require(_0x91b5('0x3'));var rp=require('request-promise');var moment=require(_0x91b5('0x4'));var BPromise=require(_0x91b5('0x5'));var Mustache=require('mustache');var util=require(_0x91b5('0x6'));var path=require(_0x91b5('0x7'));var sox=require(_0x91b5('0x8'));var csv=require(_0x91b5('0x9'));var ejs=require(_0x91b5('0xa'));var fs=require('fs');var fs_extra=require(_0x91b5('0xb'));var _=require('lodash');var squel=require(_0x91b5('0xc'));var crypto=require(_0x91b5('0xd'));var jsforce=require(_0x91b5('0xe'));var deskjs=require(_0x91b5('0xf'));var toCsv=require('to-csv');var querystring=require(_0x91b5('0x10'));var Papa=require('papaparse');var Redis=require(_0x91b5('0x11'));var authService=require(_0x91b5('0x12'));var qs=require(_0x91b5('0x13'));var as=require(_0x91b5('0x14'));var hardwareService=require(_0x91b5('0x15'));var logger=require(_0x91b5('0x16'))(_0x91b5('0x17'));var utils=require(_0x91b5('0x18'));var config=require(_0x91b5('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0x91b5('0x1a'))['db'];function respondWithStatusCode(_0xf8f152,_0x17548d){_0x17548d=_0x17548d||0xcc;return function(_0xde57e3){if(_0xde57e3){return _0xf8f152[_0x91b5('0x1b')](_0x17548d);}return _0xf8f152['status'](_0x17548d)[_0x91b5('0x1c')]();};}function respondWithResult(_0x2aa2ae,_0x475459){_0x475459=_0x475459||0xc8;return function(_0x3fcf97){if(_0x3fcf97){return _0x2aa2ae[_0x91b5('0x1d')](_0x475459)[_0x91b5('0x1e')](_0x3fcf97);}};}function respondWithFilteredResult(_0x2e14d0,_0x96cfb5){return function(_0x545c28){if(_0x545c28){var _0x42bddc=typeof _0x96cfb5[_0x91b5('0x1f')]===_0x91b5('0x20')&&typeof _0x96cfb5[_0x91b5('0x21')]==='undefined';var _0x504fa6=_0x545c28[_0x91b5('0x22')];var _0x3411d4=_0x42bddc?0x0:_0x96cfb5[_0x91b5('0x1f')];var _0x5f476f=_0x42bddc?_0x545c28[_0x91b5('0x22')]:_0x96cfb5[_0x91b5('0x1f')]+_0x96cfb5['limit'];var _0x4fed86;if(_0x5f476f>=_0x504fa6){_0x5f476f=_0x504fa6;_0x4fed86=0xc8;}else{_0x4fed86=0xce;}_0x2e14d0[_0x91b5('0x1d')](_0x4fed86);return _0x2e14d0[_0x91b5('0x23')](_0x91b5('0x24'),_0x3411d4+'-'+_0x5f476f+'/'+_0x504fa6)[_0x91b5('0x1e')](_0x545c28);}return null;};}function patchUpdates(_0x1d0c18){return function(_0xea885b){try{jsonpatch[_0x91b5('0x25')](_0xea885b,_0x1d0c18,!![]);}catch(_0x52c2d5){return BPromise[_0x91b5('0x26')](_0x52c2d5);}return _0xea885b[_0x91b5('0x27')]();};}function saveUpdates(_0x206ead,_0xb5aed5){return function(_0x4d0223){if(_0x4d0223){return _0x4d0223[_0x91b5('0x28')](_0x206ead)[_0x91b5('0x29')](function(_0x44ab28){return _0x44ab28;});}return null;};}function removeEntity(_0x136db5,_0x54e850){return function(_0x1a6665){if(_0x1a6665){return _0x1a6665['destroy']()[_0x91b5('0x29')](function(){_0x136db5['status'](0xcc)[_0x91b5('0x1c')]();});}};}function handleEntityNotFound(_0x1b33a2,_0xce48ea){return function(_0x5109ad){if(!_0x5109ad){_0x1b33a2[_0x91b5('0x1b')](0x194);}return _0x5109ad;};}function handleError(_0x48b75b,_0x59310a){_0x59310a=_0x59310a||0x1f4;return function(_0x281c77){logger[_0x91b5('0x2a')](_0x281c77[_0x91b5('0x2b')]);if(_0x281c77['name']){delete _0x281c77[_0x91b5('0x2c')];}_0x48b75b[_0x91b5('0x1d')](_0x59310a)[_0x91b5('0x2d')](_0x281c77);};}exports[_0x91b5('0x2e')]=function(_0x4c54c7,_0x29ccc9){var _0x37c307={},_0x4c2494={},_0x25da6d={'count':0x0,'rows':[]};var _0x2a60cb=_['map'](db[_0x91b5('0x2f')][_0x91b5('0x30')],function(_0x40bea4){return{'name':_0x40bea4[_0x91b5('0x31')],'type':_0x40bea4[_0x91b5('0x32')][_0x91b5('0x33')]};});_0x4c2494[_0x91b5('0x34')]=_[_0x91b5('0x35')](_[_0x91b5('0x36')](_0x2a60cb,_0x91b5('0x2c')),[_0x91b5('0x2c')]);_0x4c2494[_0x91b5('0x37')]=_['keys'](_0x4c54c7[_0x91b5('0x37')]);_0x4c2494['filters']=_[_0x91b5('0x38')](_0x4c2494[_0x91b5('0x34')],_0x4c2494['query']);_0x37c307[_0x91b5('0x39')]=_[_0x91b5('0x38')](_0x4c2494[_0x91b5('0x34')],qs['fields'](_0x4c54c7[_0x91b5('0x37')][_0x91b5('0x3a')]));_0x37c307[_0x91b5('0x39')]=_0x37c307['attributes'][_0x91b5('0x3b')]?_0x37c307['attributes']:_0x4c2494[_0x91b5('0x34')];if(!_0x4c54c7[_0x91b5('0x37')][_0x91b5('0x3c')]('nolimit')){_0x37c307['limit']=qs[_0x91b5('0x21')](_0x4c54c7['query'][_0x91b5('0x21')]);_0x37c307[_0x91b5('0x1f')]=qs['offset'](_0x4c54c7[_0x91b5('0x37')][_0x91b5('0x1f')]);}_0x37c307[_0x91b5('0x3d')]=qs[_0x91b5('0x3e')](_0x4c54c7[_0x91b5('0x37')][_0x91b5('0x3e')]);_0x37c307[_0x91b5('0x3f')]=qs[_0x91b5('0x40')](_['pick'](_0x4c54c7[_0x91b5('0x37')],_0x4c2494['filters']),_0x2a60cb);if(_0x4c54c7[_0x91b5('0x37')][_0x91b5('0x41')]){_0x37c307[_0x91b5('0x3f')]=_['merge'](_0x37c307['where'],{'$or':_['map'](_0x2a60cb,function(_0x1a0411){if(_0x1a0411[_0x91b5('0x32')]!==_0x91b5('0x42')){var _0x645ab7={};_0x645ab7[_0x1a0411[_0x91b5('0x2c')]]={'$like':'%'+_0x4c54c7[_0x91b5('0x37')][_0x91b5('0x41')]+'%'};return _0x645ab7;}})});}_0x37c307=_[_0x91b5('0x43')]({},_0x37c307,_0x4c54c7[_0x91b5('0x44')]);var _0x1aa9e4={'where':_0x37c307[_0x91b5('0x3f')]};return db[_0x91b5('0x2f')][_0x91b5('0x22')](_0x1aa9e4)['then'](function(_0x255c71){_0x25da6d[_0x91b5('0x22')]=_0x255c71;if(_0x4c54c7[_0x91b5('0x37')][_0x91b5('0x45')]){_0x37c307['include']=[{'all':!![]}];}return db['VoiceMailMessage'][_0x91b5('0x46')](_0x37c307);})[_0x91b5('0x29')](function(_0x303cc3){_0x25da6d['rows']=_0x303cc3;return _0x25da6d;})[_0x91b5('0x29')](respondWithFilteredResult(_0x29ccc9,_0x37c307))[_0x91b5('0x47')](handleError(_0x29ccc9,null));};exports[_0x91b5('0x48')]=function(_0x3d102c,_0x30f285){var _0x562e70={'raw':!![],'where':{'id':_0x3d102c[_0x91b5('0x49')]['id']}},_0x287f9f={};_0x287f9f[_0x91b5('0x34')]=_[_0x91b5('0x4a')](db[_0x91b5('0x2f')][_0x91b5('0x30')]);_0x287f9f[_0x91b5('0x37')]=_['keys'](_0x3d102c['query']);_0x287f9f[_0x91b5('0x40')]=_[_0x91b5('0x38')](_0x287f9f[_0x91b5('0x34')],_0x287f9f[_0x91b5('0x37')]);_0x562e70['attributes']=_[_0x91b5('0x38')](_0x287f9f['model'],qs[_0x91b5('0x3a')](_0x3d102c[_0x91b5('0x37')][_0x91b5('0x3a')]));_0x562e70[_0x91b5('0x39')]=_0x562e70[_0x91b5('0x39')][_0x91b5('0x3b')]?_0x562e70['attributes']:_0x287f9f['model'];if(_0x3d102c[_0x91b5('0x37')]['includeAll']){_0x562e70[_0x91b5('0x4b')]=[{'all':!![]}];}_0x562e70=_[_0x91b5('0x43')]({},_0x562e70,_0x3d102c[_0x91b5('0x44')]);return db[_0x91b5('0x2f')]['find'](_0x562e70)[_0x91b5('0x29')](handleEntityNotFound(_0x30f285,null))[_0x91b5('0x29')](respondWithResult(_0x30f285,null))[_0x91b5('0x47')](handleError(_0x30f285,null));};exports[_0x91b5('0x4c')]=function(_0x2c77d6,_0x3500a8){return db[_0x91b5('0x2f')][_0x91b5('0x4c')](_0x2c77d6[_0x91b5('0x4d')],{})[_0x91b5('0x29')](respondWithResult(_0x3500a8,0xc9))[_0x91b5('0x47')](handleError(_0x3500a8,null));};exports[_0x91b5('0x28')]=function(_0x3fc38b,_0x3063f5){if(_0x3fc38b[_0x91b5('0x4d')]['id']){delete _0x3fc38b[_0x91b5('0x4d')]['id'];}return db['VoiceMailMessage'][_0x91b5('0x4e')]({'where':{'id':_0x3fc38b['params']['id']}})['then'](handleEntityNotFound(_0x3063f5,null))[_0x91b5('0x29')](saveUpdates(_0x3fc38b[_0x91b5('0x4d')],null))[_0x91b5('0x29')](respondWithResult(_0x3063f5,null))[_0x91b5('0x47')](handleError(_0x3063f5,null));};exports['destroy']=function(_0x257d4a,_0x475f21){return db['VoiceMailMessage'][_0x91b5('0x4e')]({'where':{'id':_0x257d4a[_0x91b5('0x49')]['id']}})[_0x91b5('0x29')](handleEntityNotFound(_0x475f21,null))[_0x91b5('0x29')](removeEntity(_0x475f21,null))['catch'](handleError(_0x475f21,null));};exports[_0x91b5('0x4f')]=function(_0x4e076f,_0x8e211f,_0x34e8df){return db[_0x91b5('0x2f')][_0x91b5('0x4e')]({'where':{'id':_0x4e076f['params']['id']},'attributes':['id',_0x91b5('0x50'),_0x91b5('0x51')]})['then'](handleEntityNotFound(_0x8e211f,null))['then'](function(_0x272e72){if(_0x272e72){if(!_0x272e72['recording']){throw new db[(_0x91b5('0x52'))][(_0x91b5('0x53'))](_0x91b5('0x54'));}var _0x48c776={'Content-Type':_0x91b5('0x55'),'Content-Disposition':_0x91b5('0x56')};if(_0x272e72[_0x91b5('0x51')]){_0x48c776['Content-Disposition']='attachment;\x20filename=\x22'+_0x272e72['msg_id']+'.wav\x22';}_0x8e211f['set'](_0x48c776);return _0x8e211f[_0x91b5('0x2d')](new Buffer(_0x272e72[_0x91b5('0x50')]));}})[_0x91b5('0x47')](handleError(_0x8e211f,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