Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index c30bef4..c4831a3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x72b1=['offset','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','show','params','VoiceMailMessage','find','create','body','update','catch','download','recording','msg_id','Sequelize','audio/wav','attachment','Content-Disposition','attachment;\x20filename=\x22','.wav\x22','send','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','squel','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','status','json','count','limit','set','Content-Range','apply','reject','save','destroy','then','end','sendStatus','error','stack','name','index','map','rawAttributes','key','model','differenceBy','query','keys','filters','intersection','attributes','fields','length','nolimit'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x72b1,0x16e));var _0x172b=function(_0x1db819,_0x839933){_0x1db819=_0x1db819-0x0;var _0x2325f4=_0x72b1[_0x1db819];return _0x2325f4;};'use strict';var pdf=require(_0x172b('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x172b('0x1'));var zipdir=require(_0x172b('0x2'));var jsonpatch=require(_0x172b('0x3'));var rp=require(_0x172b('0x4'));var moment=require(_0x172b('0x5'));var BPromise=require(_0x172b('0x6'));var Mustache=require(_0x172b('0x7'));var util=require('util');var path=require(_0x172b('0x8'));var sox=require(_0x172b('0x9'));var csv=require(_0x172b('0xa'));var ejs=require(_0x172b('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x172b('0xc'));var crypto=require('crypto');var jsforce=require(_0x172b('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x172b('0xa'));var querystring=require(_0x172b('0xe'));var Papa=require(_0x172b('0xf'));var Redis=require(_0x172b('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x172b('0x11'));var as=require(_0x172b('0x12'));var hardwareService=require(_0x172b('0x13'));var logger=require(_0x172b('0x14'))(_0x172b('0x15'));var utils=require(_0x172b('0x16'));var config=require(_0x172b('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x13d285,_0x82727f){_0x82727f=_0x82727f||0xcc;return function(_0xdf832e){if(_0xdf832e){return _0x13d285['sendStatus'](_0x82727f);}return _0x13d285[_0x172b('0x18')](_0x82727f)['end']();};}function respondWithResult(_0x2611c2,_0x81e11e){_0x81e11e=_0x81e11e||0xc8;return function(_0x5239b9){if(_0x5239b9){return _0x2611c2[_0x172b('0x18')](_0x81e11e)[_0x172b('0x19')](_0x5239b9);}};}function respondWithFilteredResult(_0x2790ed,_0xa28463){return function(_0x5b0ab1){if(_0x5b0ab1){var _0x5293ef=_0x5b0ab1[_0x172b('0x1a')],_0x3625bb=_0xa28463['offset'],_0x34be39=_0xa28463['offset']+_0xa28463[_0x172b('0x1b')],_0x36af74;if(_0x34be39>=_0x5293ef){_0x34be39=_0x5293ef;_0x36af74=0xc8;}else{_0x36af74=0xce;}_0x2790ed[_0x172b('0x18')](_0x36af74);return _0x2790ed[_0x172b('0x1c')](_0x172b('0x1d'),_0x3625bb+'-'+_0x34be39+'/'+_0x5293ef)[_0x172b('0x19')](_0x5b0ab1);}return null;};}function patchUpdates(_0x4e7cb9){return function(_0x304b96){try{jsonpatch[_0x172b('0x1e')](_0x304b96,_0x4e7cb9,!![]);}catch(_0x2bedae){return BPromise[_0x172b('0x1f')](_0x2bedae);}return _0x304b96[_0x172b('0x20')]();};}function saveUpdates(_0x266b13,_0x296aa6){return function(_0x5c7e17){if(_0x5c7e17){return _0x5c7e17['update'](_0x266b13)['then'](function(_0x5abb78){return _0x5abb78;});}return null;};}function removeEntity(_0x13cfc7,_0x4c8090){return function(_0x721d07){if(_0x721d07){return _0x721d07[_0x172b('0x21')]()[_0x172b('0x22')](function(){_0x13cfc7[_0x172b('0x18')](0xcc)[_0x172b('0x23')]();});}};}function handleEntityNotFound(_0x24e4ff,_0x507b99){return function(_0x1cefd1){if(!_0x1cefd1){_0x24e4ff[_0x172b('0x24')](0x194);}return _0x1cefd1;};}function handleError(_0x5ea2b2,_0x3858fc){_0x3858fc=_0x3858fc||0x1f4;return function(_0x3ed885){logger[_0x172b('0x25')](_0x3ed885[_0x172b('0x26')]);if(_0x3ed885[_0x172b('0x27')]){delete _0x3ed885[_0x172b('0x27')];}_0x5ea2b2[_0x172b('0x18')](_0x3858fc)['send'](_0x3ed885);};}exports[_0x172b('0x28')]=function(_0x22827a,_0x5c8603){var _0x4263a1={},_0x320253={},_0x3909b1={'count':0x0,'rows':[]};var _0xa58782=_[_0x172b('0x29')](db['VoiceMailMessage'][_0x172b('0x2a')],function(_0x37acc5){return{'name':_0x37acc5['fieldName'],'type':_0x37acc5['type'][_0x172b('0x2b')]};});_0x320253[_0x172b('0x2c')]=_[_0x172b('0x2d')](_[_0x172b('0x29')](_0xa58782,_0x172b('0x27')),[_0x172b('0x27')]);_0x320253[_0x172b('0x2e')]=_[_0x172b('0x2f')](_0x22827a[_0x172b('0x2e')]);_0x320253[_0x172b('0x30')]=_[_0x172b('0x31')](_0x320253[_0x172b('0x2c')],_0x320253[_0x172b('0x2e')]);_0x4263a1[_0x172b('0x32')]=_[_0x172b('0x31')](_0x320253[_0x172b('0x2c')],qs[_0x172b('0x33')](_0x22827a[_0x172b('0x2e')][_0x172b('0x33')]));_0x4263a1[_0x172b('0x32')]=_0x4263a1[_0x172b('0x32')][_0x172b('0x34')]?_0x4263a1[_0x172b('0x32')]:_0x320253[_0x172b('0x2c')];if(!_0x22827a[_0x172b('0x2e')]['hasOwnProperty'](_0x172b('0x35'))){_0x4263a1[_0x172b('0x1b')]=qs[_0x172b('0x1b')](_0x22827a['query'][_0x172b('0x1b')]);_0x4263a1['offset']=qs['offset'](_0x22827a['query'][_0x172b('0x36')]);}_0x4263a1['order']=qs['sort'](_0x22827a[_0x172b('0x2e')][_0x172b('0x37')]);_0x4263a1[_0x172b('0x38')]=qs['filters'](_[_0x172b('0x39')](_0x22827a[_0x172b('0x2e')],_0x320253[_0x172b('0x30')]));if(_0x22827a[_0x172b('0x2e')][_0x172b('0x3a')]){_0x4263a1[_0x172b('0x38')]=_[_0x172b('0x3b')](_0x4263a1[_0x172b('0x38')],{'$or':_[_0x172b('0x29')](_0xa58782,function(_0xbf287b){if(_0xbf287b[_0x172b('0x3c')]!==_0x172b('0x3d')){var _0x2e45fe={};_0x2e45fe[_0xbf287b[_0x172b('0x27')]]={'$like':'%'+_0x22827a[_0x172b('0x2e')][_0x172b('0x3a')]+'%'};return _0x2e45fe;}})});}_0x4263a1=_[_0x172b('0x3b')]({},_0x4263a1,_0x22827a[_0x172b('0x3e')]);var _0x47821e={'where':_0x4263a1['where']};return db['VoiceMailMessage'][_0x172b('0x1a')](_0x47821e)['then'](function(_0x5e8ff6){_0x3909b1['count']=_0x5e8ff6;if(_0x22827a[_0x172b('0x2e')][_0x172b('0x3f')]){_0x4263a1[_0x172b('0x40')]=[{'all':!![]}];}return db['VoiceMailMessage'][_0x172b('0x41')](_0x4263a1);})[_0x172b('0x22')](function(_0xb5452f){_0x3909b1['rows']=_0xb5452f;return _0x3909b1;})[_0x172b('0x22')](respondWithFilteredResult(_0x5c8603,_0x4263a1))['catch'](handleError(_0x5c8603,null));};exports[_0x172b('0x42')]=function(_0x4a05da,_0x362f83){var _0xc45ecd={'raw':!![],'where':{'id':_0x4a05da[_0x172b('0x43')]['id']}},_0x59bfd1={};_0x59bfd1[_0x172b('0x2c')]=_['keys'](db[_0x172b('0x44')][_0x172b('0x2a')]);_0x59bfd1[_0x172b('0x2e')]=_[_0x172b('0x2f')](_0x4a05da[_0x172b('0x2e')]);_0x59bfd1[_0x172b('0x30')]=_['intersection'](_0x59bfd1['model'],_0x59bfd1[_0x172b('0x2e')]);_0xc45ecd['attributes']=_['intersection'](_0x59bfd1['model'],qs[_0x172b('0x33')](_0x4a05da[_0x172b('0x2e')][_0x172b('0x33')]));_0xc45ecd[_0x172b('0x32')]=_0xc45ecd['attributes'][_0x172b('0x34')]?_0xc45ecd[_0x172b('0x32')]:_0x59bfd1[_0x172b('0x2c')];if(_0x4a05da[_0x172b('0x2e')][_0x172b('0x3f')]){_0xc45ecd[_0x172b('0x40')]=[{'all':!![]}];}_0xc45ecd=_[_0x172b('0x3b')]({},_0xc45ecd,_0x4a05da[_0x172b('0x3e')]);return db[_0x172b('0x44')][_0x172b('0x45')](_0xc45ecd)[_0x172b('0x22')](handleEntityNotFound(_0x362f83,null))[_0x172b('0x22')](respondWithResult(_0x362f83,null))['catch'](handleError(_0x362f83,null));};exports[_0x172b('0x46')]=function(_0x350a8c,_0x56bc8a){return db['VoiceMailMessage'][_0x172b('0x46')](_0x350a8c[_0x172b('0x47')],{})[_0x172b('0x22')](respondWithResult(_0x56bc8a,0xc9))['catch'](handleError(_0x56bc8a,null));};exports[_0x172b('0x48')]=function(_0x5e8e08,_0x52c55c){if(_0x5e8e08[_0x172b('0x47')]['id']){delete _0x5e8e08[_0x172b('0x47')]['id'];}return db[_0x172b('0x44')][_0x172b('0x45')]({'where':{'id':_0x5e8e08[_0x172b('0x43')]['id']}})[_0x172b('0x22')](handleEntityNotFound(_0x52c55c,null))[_0x172b('0x22')](saveUpdates(_0x5e8e08[_0x172b('0x47')],null))[_0x172b('0x22')](respondWithResult(_0x52c55c,null))[_0x172b('0x49')](handleError(_0x52c55c,null));};exports['destroy']=function(_0x4c7470,_0x382075){return db[_0x172b('0x44')]['find']({'where':{'id':_0x4c7470['params']['id']}})[_0x172b('0x22')](handleEntityNotFound(_0x382075,null))[_0x172b('0x22')](removeEntity(_0x382075,null))[_0x172b('0x49')](handleError(_0x382075,null));};exports[_0x172b('0x4a')]=function(_0x3dedd2,_0x1e1793,_0x5c0526){return db[_0x172b('0x44')]['find']({'where':{'id':_0x3dedd2['params']['id']},'attributes':['id',_0x172b('0x4b'),_0x172b('0x4c')]})[_0x172b('0x22')](handleEntityNotFound(_0x1e1793,null))['then'](function(_0x3c2fbd){if(_0x3c2fbd){if(!_0x3c2fbd[_0x172b('0x4b')]){throw new db[(_0x172b('0x4d'))]['ValidationError']('VoiceMailMessage\x20not\x20found');}var _0x2cd795={'Content-Type':_0x172b('0x4e'),'Content-Disposition':_0x172b('0x4f')};if(_0x3c2fbd[_0x172b('0x4c')]){_0x2cd795[_0x172b('0x50')]=_0x172b('0x51')+_0x3c2fbd[_0x172b('0x4c')]+_0x172b('0x52');}_0x1e1793['set'](_0x2cd795);return _0x1e1793[_0x172b('0x53')](new Buffer(_0x3c2fbd['recording']));}})['catch'](handleError(_0x1e1793,null));};
\ No newline at end of file
+var _0xe590=['rawAttributes','fields','length','options','find','body','recording','msg_id','ValidationError','VoiceMailMessage\x20not\x20found','audio/wav','attachment','Content-Disposition','attachment;\x20filename=\x22','.wav\x22','set','send','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','apply','reject','save','update','then','destroy','name','VoiceMailMessage','fieldName','type','model','map','keys','query','filters','attributes','intersection','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','includeAll','include','rows','catch','params'];(function(_0x11d7c9,_0x11549a){var _0x278e53=function(_0x427769){while(--_0x427769){_0x11d7c9['push'](_0x11d7c9['shift']());}};_0x278e53(++_0x11549a);}(_0xe590,0xaf));var _0x0e59=function(_0x40f52b,_0x522fd4){_0x40f52b=_0x40f52b-0x0;var _0x3afe11=_0xe590[_0x40f52b];return _0x3afe11;};'use strict';var emlformat=require(_0x0e59('0x0'));var rimraf=require(_0x0e59('0x1'));var zipdir=require(_0x0e59('0x2'));var jsonpatch=require(_0x0e59('0x3'));var rp=require(_0x0e59('0x4'));var moment=require('moment');var BPromise=require(_0x0e59('0x5'));var Mustache=require(_0x0e59('0x6'));var util=require(_0x0e59('0x7'));var path=require(_0x0e59('0x8'));var sox=require(_0x0e59('0x9'));var csv=require('to-csv');var ejs=require(_0x0e59('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x0e59('0xb'));var crypto=require(_0x0e59('0xc'));var jsforce=require(_0x0e59('0xd'));var deskjs=require(_0x0e59('0xe'));var toCsv=require(_0x0e59('0xf'));var querystring=require(_0x0e59('0x10'));var Papa=require(_0x0e59('0x11'));var Redis=require(_0x0e59('0x12'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x0e59('0x13'));var hardwareService=require(_0x0e59('0x14'));var logger=require('../../config/logger')(_0x0e59('0x15'));var utils=require('../../config/utils');var config=require(_0x0e59('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x0e59('0x17'))['db'];function respondWithStatusCode(_0x2c0482,_0x587b2e){_0x587b2e=_0x587b2e||0xcc;return function(_0x4c627d){if(_0x4c627d){return _0x2c0482[_0x0e59('0x18')](_0x587b2e);}return _0x2c0482['status'](_0x587b2e)[_0x0e59('0x19')]();};}function respondWithResult(_0x55b310,_0x259611){_0x259611=_0x259611||0xc8;return function(_0x102116){if(_0x102116){return _0x55b310[_0x0e59('0x1a')](_0x259611)[_0x0e59('0x1b')](_0x102116);}};}function respondWithFilteredResult(_0x12aa9d,_0x2f3c05){return function(_0x5054ad){if(_0x5054ad){var _0x4c490a=typeof _0x2f3c05[_0x0e59('0x1c')]===_0x0e59('0x1d')&&typeof _0x2f3c05[_0x0e59('0x1e')]===_0x0e59('0x1d');var _0x9fbbb5=_0x5054ad[_0x0e59('0x1f')];var _0xcc2daa=_0x4c490a?0x0:_0x2f3c05[_0x0e59('0x1c')];var _0xb4b188=_0x4c490a?_0x5054ad[_0x0e59('0x1f')]:_0x2f3c05[_0x0e59('0x1c')]+_0x2f3c05['limit'];var _0xf4fa93;if(_0xb4b188>=_0x9fbbb5){_0xb4b188=_0x9fbbb5;_0xf4fa93=0xc8;}else{_0xf4fa93=0xce;}_0x12aa9d[_0x0e59('0x1a')](_0xf4fa93);return _0x12aa9d['set']('Content-Range',_0xcc2daa+'-'+_0xb4b188+'/'+_0x9fbbb5)[_0x0e59('0x1b')](_0x5054ad);}return null;};}function patchUpdates(_0x11cdfd){return function(_0x4b5714){try{jsonpatch[_0x0e59('0x20')](_0x4b5714,_0x11cdfd,!![]);}catch(_0x1e4db7){return BPromise[_0x0e59('0x21')](_0x1e4db7);}return _0x4b5714[_0x0e59('0x22')]();};}function saveUpdates(_0x2ecd14,_0x2a4294){return function(_0x22c799){if(_0x22c799){return _0x22c799[_0x0e59('0x23')](_0x2ecd14)[_0x0e59('0x24')](function(_0x5d7a0b){return _0x5d7a0b;});}return null;};}function removeEntity(_0x556ef2,_0x1e58bb){return function(_0x5b41a2){if(_0x5b41a2){return _0x5b41a2[_0x0e59('0x25')]()[_0x0e59('0x24')](function(){_0x556ef2[_0x0e59('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x42edbc,_0x23ff98){return function(_0x33b4d1){if(!_0x33b4d1){_0x42edbc[_0x0e59('0x18')](0x194);}return _0x33b4d1;};}function handleError(_0x31400c,_0x100916){_0x100916=_0x100916||0x1f4;return function(_0x22a843){logger['error'](_0x22a843['stack']);if(_0x22a843[_0x0e59('0x26')]){delete _0x22a843['name'];}_0x31400c[_0x0e59('0x1a')](_0x100916)['send'](_0x22a843);};}exports['index']=function(_0x45177e,_0x9682fa){var _0x59209e={},_0x3c9a61={},_0x200251={'count':0x0,'rows':[]};var _0x3a2fce=_['map'](db[_0x0e59('0x27')]['rawAttributes'],function(_0x51dbc1){return{'name':_0x51dbc1[_0x0e59('0x28')],'type':_0x51dbc1[_0x0e59('0x29')]['key']};});_0x3c9a61[_0x0e59('0x2a')]=_['differenceBy'](_[_0x0e59('0x2b')](_0x3a2fce,_0x0e59('0x26')),['name']);_0x3c9a61['query']=_[_0x0e59('0x2c')](_0x45177e[_0x0e59('0x2d')]);_0x3c9a61[_0x0e59('0x2e')]=_['intersection'](_0x3c9a61[_0x0e59('0x2a')],_0x3c9a61[_0x0e59('0x2d')]);_0x59209e[_0x0e59('0x2f')]=_[_0x0e59('0x30')](_0x3c9a61[_0x0e59('0x2a')],qs['fields'](_0x45177e['query']['fields']));_0x59209e[_0x0e59('0x2f')]=_0x59209e[_0x0e59('0x2f')]['length']?_0x59209e[_0x0e59('0x2f')]:_0x3c9a61[_0x0e59('0x2a')];if(!_0x45177e[_0x0e59('0x2d')][_0x0e59('0x31')](_0x0e59('0x32'))){_0x59209e[_0x0e59('0x1e')]=qs[_0x0e59('0x1e')](_0x45177e['query'][_0x0e59('0x1e')]);_0x59209e[_0x0e59('0x1c')]=qs[_0x0e59('0x1c')](_0x45177e[_0x0e59('0x2d')]['offset']);}_0x59209e['order']=qs['sort'](_0x45177e[_0x0e59('0x2d')][_0x0e59('0x33')]);_0x59209e[_0x0e59('0x34')]=qs[_0x0e59('0x2e')](_[_0x0e59('0x35')](_0x45177e[_0x0e59('0x2d')],_0x3c9a61[_0x0e59('0x2e')]),_0x3a2fce);if(_0x45177e[_0x0e59('0x2d')][_0x0e59('0x36')]){_0x59209e[_0x0e59('0x34')]=_[_0x0e59('0x37')](_0x59209e[_0x0e59('0x34')],{'$or':_[_0x0e59('0x2b')](_0x3a2fce,function(_0x4810d3){if(_0x4810d3[_0x0e59('0x29')]!==_0x0e59('0x38')){var _0x1fe9ca={};_0x1fe9ca[_0x4810d3[_0x0e59('0x26')]]={'$like':'%'+_0x45177e[_0x0e59('0x2d')][_0x0e59('0x36')]+'%'};return _0x1fe9ca;}})});}_0x59209e=_['merge']({},_0x59209e,_0x45177e['options']);var _0x33a645={'where':_0x59209e['where']};return db['VoiceMailMessage'][_0x0e59('0x1f')](_0x33a645)[_0x0e59('0x24')](function(_0x3cd13c){_0x200251['count']=_0x3cd13c;if(_0x45177e['query'][_0x0e59('0x39')]){_0x59209e[_0x0e59('0x3a')]=[{'all':!![]}];}return db['VoiceMailMessage']['findAll'](_0x59209e);})[_0x0e59('0x24')](function(_0x5e2047){_0x200251[_0x0e59('0x3b')]=_0x5e2047;return _0x200251;})[_0x0e59('0x24')](respondWithFilteredResult(_0x9682fa,_0x59209e))[_0x0e59('0x3c')](handleError(_0x9682fa,null));};exports['show']=function(_0x599b7f,_0x5da923){var _0x3405d2={'raw':!![],'where':{'id':_0x599b7f[_0x0e59('0x3d')]['id']}},_0x5674d9={};_0x5674d9[_0x0e59('0x2a')]=_['keys'](db['VoiceMailMessage'][_0x0e59('0x3e')]);_0x5674d9[_0x0e59('0x2d')]=_[_0x0e59('0x2c')](_0x599b7f[_0x0e59('0x2d')]);_0x5674d9[_0x0e59('0x2e')]=_['intersection'](_0x5674d9[_0x0e59('0x2a')],_0x5674d9[_0x0e59('0x2d')]);_0x3405d2[_0x0e59('0x2f')]=_[_0x0e59('0x30')](_0x5674d9[_0x0e59('0x2a')],qs[_0x0e59('0x3f')](_0x599b7f[_0x0e59('0x2d')][_0x0e59('0x3f')]));_0x3405d2[_0x0e59('0x2f')]=_0x3405d2[_0x0e59('0x2f')][_0x0e59('0x40')]?_0x3405d2[_0x0e59('0x2f')]:_0x5674d9[_0x0e59('0x2a')];if(_0x599b7f[_0x0e59('0x2d')]['includeAll']){_0x3405d2[_0x0e59('0x3a')]=[{'all':!![]}];}_0x3405d2=_[_0x0e59('0x37')]({},_0x3405d2,_0x599b7f[_0x0e59('0x41')]);return db[_0x0e59('0x27')][_0x0e59('0x42')](_0x3405d2)[_0x0e59('0x24')](handleEntityNotFound(_0x5da923,null))[_0x0e59('0x24')](respondWithResult(_0x5da923,null))[_0x0e59('0x3c')](handleError(_0x5da923,null));};exports['create']=function(_0x5ceda3,_0x235fd0){return db[_0x0e59('0x27')]['create'](_0x5ceda3['body'],{})[_0x0e59('0x24')](respondWithResult(_0x235fd0,0xc9))['catch'](handleError(_0x235fd0,null));};exports[_0x0e59('0x23')]=function(_0x1299e7,_0x21116b){if(_0x1299e7['body']['id']){delete _0x1299e7[_0x0e59('0x43')]['id'];}return db[_0x0e59('0x27')][_0x0e59('0x42')]({'where':{'id':_0x1299e7[_0x0e59('0x3d')]['id']}})[_0x0e59('0x24')](handleEntityNotFound(_0x21116b,null))[_0x0e59('0x24')](saveUpdates(_0x1299e7[_0x0e59('0x43')],null))[_0x0e59('0x24')](respondWithResult(_0x21116b,null))['catch'](handleError(_0x21116b,null));};exports[_0x0e59('0x25')]=function(_0x301950,_0x5fcc12){return db[_0x0e59('0x27')][_0x0e59('0x42')]({'where':{'id':_0x301950[_0x0e59('0x3d')]['id']}})[_0x0e59('0x24')](handleEntityNotFound(_0x5fcc12,null))[_0x0e59('0x24')](removeEntity(_0x5fcc12,null))['catch'](handleError(_0x5fcc12,null));};exports['download']=function(_0x500191,_0x492975,_0x5a461f){return db[_0x0e59('0x27')][_0x0e59('0x42')]({'where':{'id':_0x500191['params']['id']},'attributes':['id',_0x0e59('0x44'),_0x0e59('0x45')]})[_0x0e59('0x24')](handleEntityNotFound(_0x492975,null))[_0x0e59('0x24')](function(_0x5b1583){if(_0x5b1583){if(!_0x5b1583[_0x0e59('0x44')]){throw new db['Sequelize'][(_0x0e59('0x46'))](_0x0e59('0x47'));}var _0x3dca09={'Content-Type':_0x0e59('0x48'),'Content-Disposition':_0x0e59('0x49')};if(_0x5b1583['msg_id']){_0x3dca09[_0x0e59('0x4a')]=_0x0e59('0x4b')+_0x5b1583[_0x0e59('0x45')]+_0x0e59('0x4c');}_0x492975[_0x0e59('0x4d')](_0x3dca09);return _0x492975[_0x0e59('0x4e')](new Buffer(_0x5b1583['recording']));}})[_0x0e59('0x3c')](handleError(_0x492975,null));};
\ No newline at end of file