Built motion from commit 0900f080.|2.5.45
[motion2.git] / server / api / faxApplication / faxApplication.controller.js
index 68bda05..77d55f4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xafc4=['options','includeAll','include','catch','show','params','fields','length','find','create','body','destroy','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','save','update','then','error','name','send','index','map','FaxApplication','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','hasOwnProperty','limit','order','sort','where','filters','pick','filter','merge','VIRTUAL'];(function(_0x5931e3,_0x1ef024){var _0x27e81f=function(_0x4b72dc){while(--_0x4b72dc){_0x5931e3['push'](_0x5931e3['shift']());}};_0x27e81f(++_0x1ef024);}(_0xafc4,0x1da));var _0x4afc=function(_0x45f988,_0x4354db){_0x45f988=_0x45f988-0x0;var _0x19c2f8=_0xafc4[_0x45f988];return _0x19c2f8;};'use strict';var pdf=require(_0x4afc('0x0'));var emlformat=require(_0x4afc('0x1'));var rimraf=require(_0x4afc('0x2'));var zipdir=require(_0x4afc('0x3'));var jsonpatch=require(_0x4afc('0x4'));var rp=require(_0x4afc('0x5'));var moment=require(_0x4afc('0x6'));var BPromise=require(_0x4afc('0x7'));var Mustache=require(_0x4afc('0x8'));var util=require('util');var path=require(_0x4afc('0x9'));var sox=require(_0x4afc('0xa'));var csv=require('to-csv');var ejs=require(_0x4afc('0xb'));var fs=require('fs');var _=require(_0x4afc('0xc'));var squel=require(_0x4afc('0xd'));var crypto=require(_0x4afc('0xe'));var jsforce=require(_0x4afc('0xf'));var deskjs=require(_0x4afc('0x10'));var toCsv=require(_0x4afc('0x11'));var querystring=require(_0x4afc('0x12'));var Papa=require(_0x4afc('0x13'));var Redis=require(_0x4afc('0x14'));var authService=require(_0x4afc('0x15'));var qs=require(_0x4afc('0x16'));var as=require(_0x4afc('0x17'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x4afc('0x18'));var utils=require('../../config/utils');var config=require(_0x4afc('0x19'));var licenseUtil=require(_0x4afc('0x1a'));var db=require(_0x4afc('0x1b'))['db'];function respondWithStatusCode(_0x7bb3b2,_0x5d1cc0){_0x5d1cc0=_0x5d1cc0||0xcc;return function(_0x27143e){if(_0x27143e){return _0x7bb3b2[_0x4afc('0x1c')](_0x5d1cc0);}return _0x7bb3b2[_0x4afc('0x1d')](_0x5d1cc0)[_0x4afc('0x1e')]();};}function respondWithResult(_0x119da3,_0xf517d){_0xf517d=_0xf517d||0xc8;return function(_0x21f61b){if(_0x21f61b){return _0x119da3[_0x4afc('0x1d')](_0xf517d)[_0x4afc('0x1f')](_0x21f61b);}};}function respondWithFilteredResult(_0x123c55,_0x1b3e28){return function(_0x133461){if(_0x133461){var _0x1eec63=_0x133461[_0x4afc('0x20')],_0x4f8c12=_0x1b3e28[_0x4afc('0x21')],_0x54ca2e=_0x1b3e28[_0x4afc('0x21')]+_0x1b3e28['limit'],_0x5d90bb;if(_0x54ca2e>=_0x1eec63){_0x54ca2e=_0x1eec63;_0x5d90bb=0xc8;}else{_0x5d90bb=0xce;}_0x123c55[_0x4afc('0x1d')](_0x5d90bb);return _0x123c55[_0x4afc('0x22')](_0x4afc('0x23'),_0x4f8c12+'-'+_0x54ca2e+'/'+_0x1eec63)[_0x4afc('0x1f')](_0x133461);}return null;};}function patchUpdates(_0x57146a){return function(_0x3f0016){try{jsonpatch[_0x4afc('0x24')](_0x3f0016,_0x57146a,!![]);}catch(_0x3c30bd){return BPromise['reject'](_0x3c30bd);}return _0x3f0016[_0x4afc('0x25')]();};}function saveUpdates(_0x2685b1,_0x223d46){return function(_0x186260){if(_0x186260){return _0x186260[_0x4afc('0x26')](_0x2685b1)[_0x4afc('0x27')](function(_0x11b734){return _0x11b734;});}return null;};}function removeEntity(_0x38df5c,_0x12a9f2){return function(_0x3fa210){if(_0x3fa210){return _0x3fa210['destroy']()[_0x4afc('0x27')](function(){_0x38df5c[_0x4afc('0x1d')](0xcc)[_0x4afc('0x1e')]();});}};}function handleEntityNotFound(_0x34d37f,_0x16fa74){return function(_0x20942c){if(!_0x20942c){_0x34d37f['sendStatus'](0x194);}return _0x20942c;};}function handleError(_0x56d688,_0x28d3db){_0x28d3db=_0x28d3db||0x1f4;return function(_0x3fc21f){logger[_0x4afc('0x28')](_0x3fc21f['stack']);if(_0x3fc21f[_0x4afc('0x29')]){delete _0x3fc21f[_0x4afc('0x29')];}_0x56d688[_0x4afc('0x1d')](_0x28d3db)[_0x4afc('0x2a')](_0x3fc21f);};}exports[_0x4afc('0x2b')]=function(_0x4ab5b1,_0x4e926f){var _0x61364a={},_0x202f4b={},_0x19908d={'count':0x0,'rows':[]};var _0x173dbb=_[_0x4afc('0x2c')](db[_0x4afc('0x2d')][_0x4afc('0x2e')],function(_0x145a71){return{'name':_0x145a71[_0x4afc('0x2f')],'type':_0x145a71[_0x4afc('0x30')][_0x4afc('0x31')]};});_0x202f4b[_0x4afc('0x32')]=_[_0x4afc('0x2c')](_0x173dbb,_0x4afc('0x29'));_0x202f4b[_0x4afc('0x33')]=_[_0x4afc('0x34')](_0x4ab5b1['query']);_0x202f4b['filters']=_[_0x4afc('0x35')](_0x202f4b['model'],_0x202f4b[_0x4afc('0x33')]);_0x61364a[_0x4afc('0x36')]=_[_0x4afc('0x35')](_0x202f4b[_0x4afc('0x32')],qs['fields'](_0x4ab5b1['query']['fields']));_0x61364a[_0x4afc('0x36')]=_0x61364a[_0x4afc('0x36')]['length']?_0x61364a['attributes']:_0x202f4b[_0x4afc('0x32')];if(!_0x4ab5b1[_0x4afc('0x33')][_0x4afc('0x37')]('nolimit')){_0x61364a[_0x4afc('0x38')]=qs[_0x4afc('0x38')](_0x4ab5b1[_0x4afc('0x33')][_0x4afc('0x38')]);_0x61364a['offset']=qs[_0x4afc('0x21')](_0x4ab5b1[_0x4afc('0x33')]['offset']);}_0x61364a[_0x4afc('0x39')]=qs[_0x4afc('0x3a')](_0x4ab5b1[_0x4afc('0x33')][_0x4afc('0x3a')]);_0x61364a[_0x4afc('0x3b')]=qs[_0x4afc('0x3c')](_[_0x4afc('0x3d')](_0x4ab5b1[_0x4afc('0x33')],_0x202f4b[_0x4afc('0x3c')]),_0x173dbb);if(_0x4ab5b1[_0x4afc('0x33')][_0x4afc('0x3e')]){_0x61364a[_0x4afc('0x3b')]=_[_0x4afc('0x3f')](_0x61364a[_0x4afc('0x3b')],{'$or':_['map'](_0x173dbb,function(_0x1cf7c5){if(_0x1cf7c5['type']!==_0x4afc('0x40')){var _0xad66d3={};_0xad66d3[_0x1cf7c5[_0x4afc('0x29')]]={'$like':'%'+_0x4ab5b1[_0x4afc('0x33')]['filter']+'%'};return _0xad66d3;}})});}_0x61364a=_[_0x4afc('0x3f')]({},_0x61364a,_0x4ab5b1[_0x4afc('0x41')]);var _0xd21043={'where':_0x61364a[_0x4afc('0x3b')]};return db[_0x4afc('0x2d')]['count'](_0xd21043)['then'](function(_0x233e97){_0x19908d[_0x4afc('0x20')]=_0x233e97;if(_0x4ab5b1[_0x4afc('0x33')][_0x4afc('0x42')]){_0x61364a[_0x4afc('0x43')]=[{'all':!![]}];}return db[_0x4afc('0x2d')]['findAll'](_0x61364a);})[_0x4afc('0x27')](function(_0x45c751){_0x19908d['rows']=_0x45c751;return _0x19908d;})[_0x4afc('0x27')](respondWithFilteredResult(_0x4e926f,_0x61364a))[_0x4afc('0x44')](handleError(_0x4e926f,null));};exports[_0x4afc('0x45')]=function(_0x21001a,_0x2f203b){var _0x593caf={'raw':!![],'where':{'id':_0x21001a[_0x4afc('0x46')]['id']}},_0x11f6ee={};_0x11f6ee[_0x4afc('0x32')]=_[_0x4afc('0x34')](db['FaxApplication'][_0x4afc('0x2e')]);_0x11f6ee['query']=_[_0x4afc('0x34')](_0x21001a['query']);_0x11f6ee[_0x4afc('0x3c')]=_[_0x4afc('0x35')](_0x11f6ee[_0x4afc('0x32')],_0x11f6ee[_0x4afc('0x33')]);_0x593caf['attributes']=_[_0x4afc('0x35')](_0x11f6ee['model'],qs['fields'](_0x21001a['query'][_0x4afc('0x47')]));_0x593caf[_0x4afc('0x36')]=_0x593caf[_0x4afc('0x36')][_0x4afc('0x48')]?_0x593caf['attributes']:_0x11f6ee[_0x4afc('0x32')];if(_0x21001a['query']['includeAll']){_0x593caf['include']=[{'all':!![]}];}_0x593caf=_[_0x4afc('0x3f')]({},_0x593caf,_0x21001a[_0x4afc('0x41')]);return db[_0x4afc('0x2d')][_0x4afc('0x49')](_0x593caf)[_0x4afc('0x27')](handleEntityNotFound(_0x2f203b,null))[_0x4afc('0x27')](respondWithResult(_0x2f203b,null))[_0x4afc('0x44')](handleError(_0x2f203b,null));};exports[_0x4afc('0x4a')]=function(_0x1a2a56,_0x2cfba6){return db[_0x4afc('0x2d')][_0x4afc('0x4a')](_0x1a2a56[_0x4afc('0x4b')],{})['then'](respondWithResult(_0x2cfba6,0xc9))[_0x4afc('0x44')](handleError(_0x2cfba6,null));};exports[_0x4afc('0x26')]=function(_0x3da346,_0x1af45d){if(_0x3da346[_0x4afc('0x4b')]['id']){delete _0x3da346[_0x4afc('0x4b')]['id'];}return db[_0x4afc('0x2d')]['find']({'where':{'id':_0x3da346[_0x4afc('0x46')]['id']}})[_0x4afc('0x27')](handleEntityNotFound(_0x1af45d,null))['then'](saveUpdates(_0x3da346['body'],null))[_0x4afc('0x27')](respondWithResult(_0x1af45d,null))[_0x4afc('0x44')](handleError(_0x1af45d,null));};exports[_0x4afc('0x4c')]=function(_0x119b33,_0x27f836){return db[_0x4afc('0x2d')][_0x4afc('0x49')]({'where':{'id':_0x119b33[_0x4afc('0x46')]['id']}})[_0x4afc('0x27')](handleEntityNotFound(_0x27f836,null))[_0x4afc('0x27')](removeEntity(_0x27f836,null))[_0x4afc('0x44')](handleError(_0x27f836,null));};
\ No newline at end of file
+var _0xf7f3=['../../mysqldb','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','update','then','error','stack','name','index','map','FaxApplication','fieldName','type','model','keys','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','rawAttributes','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util'];(function(_0x26bba7,_0x5a59d9){var _0x4a50d9=function(_0x3c3a08){while(--_0x3c3a08){_0x26bba7['push'](_0x26bba7['shift']());}};_0x4a50d9(++_0x5a59d9);}(_0xf7f3,0x19e));var _0x3f7f=function(_0x30a722,_0x19e000){_0x30a722=_0x30a722-0x0;var _0x109700=_0xf7f3[_0x30a722];return _0x109700;};'use strict';var emlformat=require(_0x3f7f('0x0'));var rimraf=require(_0x3f7f('0x1'));var zipdir=require(_0x3f7f('0x2'));var jsonpatch=require(_0x3f7f('0x3'));var rp=require('request-promise');var moment=require(_0x3f7f('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x3f7f('0x5'));var util=require(_0x3f7f('0x6'));var path=require('path');var sox=require(_0x3f7f('0x7'));var csv=require(_0x3f7f('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x3f7f('0x9'));var _=require(_0x3f7f('0xa'));var squel=require(_0x3f7f('0xb'));var crypto=require(_0x3f7f('0xc'));var jsforce=require(_0x3f7f('0xd'));var deskjs=require(_0x3f7f('0xe'));var toCsv=require(_0x3f7f('0x8'));var querystring=require(_0x3f7f('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x3f7f('0x10'));var qs=require(_0x3f7f('0x11'));var as=require(_0x3f7f('0x12'));var hardwareService=require(_0x3f7f('0x13'));var logger=require(_0x3f7f('0x14'))('api');var utils=require(_0x3f7f('0x15'));var config=require(_0x3f7f('0x16'));var licenseUtil=require(_0x3f7f('0x17'));var db=require(_0x3f7f('0x18'))['db'];function respondWithStatusCode(_0x306483,_0x552271){_0x552271=_0x552271||0xcc;return function(_0x41251a){if(_0x41251a){return _0x306483['sendStatus'](_0x552271);}return _0x306483[_0x3f7f('0x19')](_0x552271)[_0x3f7f('0x1a')]();};}function respondWithResult(_0x5ccf6a,_0x4d9796){_0x4d9796=_0x4d9796||0xc8;return function(_0x515893){if(_0x515893){return _0x5ccf6a[_0x3f7f('0x19')](_0x4d9796)[_0x3f7f('0x1b')](_0x515893);}};}function respondWithFilteredResult(_0x291746,_0x58f3b2){return function(_0x2e3a5a){if(_0x2e3a5a){var _0x508de7=typeof _0x58f3b2[_0x3f7f('0x1c')]===_0x3f7f('0x1d')&&typeof _0x58f3b2[_0x3f7f('0x1e')]===_0x3f7f('0x1d');var _0x57b7e3=_0x2e3a5a[_0x3f7f('0x1f')];var _0x1163b5=_0x508de7?0x0:_0x58f3b2[_0x3f7f('0x1c')];var _0xd9fd4a=_0x508de7?_0x2e3a5a[_0x3f7f('0x1f')]:_0x58f3b2[_0x3f7f('0x1c')]+_0x58f3b2[_0x3f7f('0x1e')];var _0x4bb124;if(_0xd9fd4a>=_0x57b7e3){_0xd9fd4a=_0x57b7e3;_0x4bb124=0xc8;}else{_0x4bb124=0xce;}_0x291746[_0x3f7f('0x19')](_0x4bb124);return _0x291746[_0x3f7f('0x20')](_0x3f7f('0x21'),_0x1163b5+'-'+_0xd9fd4a+'/'+_0x57b7e3)[_0x3f7f('0x1b')](_0x2e3a5a);}return null;};}function patchUpdates(_0x53fa85){return function(_0x3ccf61){try{jsonpatch[_0x3f7f('0x22')](_0x3ccf61,_0x53fa85,!![]);}catch(_0x23b610){return BPromise['reject'](_0x23b610);}return _0x3ccf61['save']();};}function saveUpdates(_0x55a18c,_0x3a58b2){return function(_0x2ebc38){if(_0x2ebc38){return _0x2ebc38[_0x3f7f('0x23')](_0x55a18c)[_0x3f7f('0x24')](function(_0xa66f39){return _0xa66f39;});}return null;};}function removeEntity(_0x5b2f0d,_0x8da2d){return function(_0x302636){if(_0x302636){return _0x302636['destroy']()[_0x3f7f('0x24')](function(){_0x5b2f0d[_0x3f7f('0x19')](0xcc)[_0x3f7f('0x1a')]();});}};}function handleEntityNotFound(_0x12ad27,_0x3cf7f2){return function(_0x1b1697){if(!_0x1b1697){_0x12ad27['sendStatus'](0x194);}return _0x1b1697;};}function handleError(_0x413c5b,_0x4ed5ab){_0x4ed5ab=_0x4ed5ab||0x1f4;return function(_0x182f71){logger[_0x3f7f('0x25')](_0x182f71[_0x3f7f('0x26')]);if(_0x182f71[_0x3f7f('0x27')]){delete _0x182f71[_0x3f7f('0x27')];}_0x413c5b['status'](_0x4ed5ab)['send'](_0x182f71);};}exports[_0x3f7f('0x28')]=function(_0x43b786,_0x18ab07){var _0xefecb7={},_0x3ad8f2={},_0x10acb7={'count':0x0,'rows':[]};var _0xb23c9b=_[_0x3f7f('0x29')](db[_0x3f7f('0x2a')]['rawAttributes'],function(_0x406ad3){return{'name':_0x406ad3[_0x3f7f('0x2b')],'type':_0x406ad3[_0x3f7f('0x2c')]['key']};});_0x3ad8f2[_0x3f7f('0x2d')]=_['map'](_0xb23c9b,_0x3f7f('0x27'));_0x3ad8f2['query']=_[_0x3f7f('0x2e')](_0x43b786[_0x3f7f('0x2f')]);_0x3ad8f2['filters']=_['intersection'](_0x3ad8f2[_0x3f7f('0x2d')],_0x3ad8f2[_0x3f7f('0x2f')]);_0xefecb7[_0x3f7f('0x30')]=_[_0x3f7f('0x31')](_0x3ad8f2[_0x3f7f('0x2d')],qs[_0x3f7f('0x32')](_0x43b786[_0x3f7f('0x2f')][_0x3f7f('0x32')]));_0xefecb7[_0x3f7f('0x30')]=_0xefecb7[_0x3f7f('0x30')][_0x3f7f('0x33')]?_0xefecb7[_0x3f7f('0x30')]:_0x3ad8f2[_0x3f7f('0x2d')];if(!_0x43b786[_0x3f7f('0x2f')][_0x3f7f('0x34')](_0x3f7f('0x35'))){_0xefecb7[_0x3f7f('0x1e')]=qs[_0x3f7f('0x1e')](_0x43b786[_0x3f7f('0x2f')]['limit']);_0xefecb7[_0x3f7f('0x1c')]=qs[_0x3f7f('0x1c')](_0x43b786[_0x3f7f('0x2f')][_0x3f7f('0x1c')]);}_0xefecb7[_0x3f7f('0x36')]=qs[_0x3f7f('0x37')](_0x43b786['query'][_0x3f7f('0x37')]);_0xefecb7[_0x3f7f('0x38')]=qs[_0x3f7f('0x39')](_[_0x3f7f('0x3a')](_0x43b786[_0x3f7f('0x2f')],_0x3ad8f2['filters']),_0xb23c9b);if(_0x43b786[_0x3f7f('0x2f')][_0x3f7f('0x3b')]){_0xefecb7[_0x3f7f('0x38')]=_[_0x3f7f('0x3c')](_0xefecb7['where'],{'$or':_[_0x3f7f('0x29')](_0xb23c9b,function(_0x41bb07){if(_0x41bb07[_0x3f7f('0x2c')]!==_0x3f7f('0x3d')){var _0x45fa7a={};_0x45fa7a[_0x41bb07[_0x3f7f('0x27')]]={'$like':'%'+_0x43b786[_0x3f7f('0x2f')][_0x3f7f('0x3b')]+'%'};return _0x45fa7a;}})});}_0xefecb7=_[_0x3f7f('0x3c')]({},_0xefecb7,_0x43b786[_0x3f7f('0x3e')]);var _0x3b53e6={'where':_0xefecb7[_0x3f7f('0x38')]};return db[_0x3f7f('0x2a')][_0x3f7f('0x1f')](_0x3b53e6)[_0x3f7f('0x24')](function(_0x3973c2){_0x10acb7['count']=_0x3973c2;if(_0x43b786[_0x3f7f('0x2f')][_0x3f7f('0x3f')]){_0xefecb7[_0x3f7f('0x40')]=[{'all':!![]}];}return db[_0x3f7f('0x2a')][_0x3f7f('0x41')](_0xefecb7);})['then'](function(_0x57b8ee){_0x10acb7[_0x3f7f('0x42')]=_0x57b8ee;return _0x10acb7;})[_0x3f7f('0x24')](respondWithFilteredResult(_0x18ab07,_0xefecb7))[_0x3f7f('0x43')](handleError(_0x18ab07,null));};exports[_0x3f7f('0x44')]=function(_0x5e1ad5,_0x1fc377){var _0x304804={'raw':!![],'where':{'id':_0x5e1ad5['params']['id']}},_0xcffa5a={};_0xcffa5a['model']=_[_0x3f7f('0x2e')](db[_0x3f7f('0x2a')][_0x3f7f('0x45')]);_0xcffa5a[_0x3f7f('0x2f')]=_[_0x3f7f('0x2e')](_0x5e1ad5[_0x3f7f('0x2f')]);_0xcffa5a[_0x3f7f('0x39')]=_[_0x3f7f('0x31')](_0xcffa5a[_0x3f7f('0x2d')],_0xcffa5a[_0x3f7f('0x2f')]);_0x304804[_0x3f7f('0x30')]=_['intersection'](_0xcffa5a[_0x3f7f('0x2d')],qs[_0x3f7f('0x32')](_0x5e1ad5['query'][_0x3f7f('0x32')]));_0x304804[_0x3f7f('0x30')]=_0x304804[_0x3f7f('0x30')][_0x3f7f('0x33')]?_0x304804[_0x3f7f('0x30')]:_0xcffa5a['model'];if(_0x5e1ad5[_0x3f7f('0x2f')]['includeAll']){_0x304804[_0x3f7f('0x40')]=[{'all':!![]}];}_0x304804=_[_0x3f7f('0x3c')]({},_0x304804,_0x5e1ad5[_0x3f7f('0x3e')]);return db['FaxApplication'][_0x3f7f('0x46')](_0x304804)[_0x3f7f('0x24')](handleEntityNotFound(_0x1fc377,null))['then'](respondWithResult(_0x1fc377,null))[_0x3f7f('0x43')](handleError(_0x1fc377,null));};exports['create']=function(_0x369aa7,_0x4f9df9){return db[_0x3f7f('0x2a')][_0x3f7f('0x47')](_0x369aa7[_0x3f7f('0x48')],{})[_0x3f7f('0x24')](respondWithResult(_0x4f9df9,0xc9))[_0x3f7f('0x43')](handleError(_0x4f9df9,null));};exports[_0x3f7f('0x23')]=function(_0x574956,_0x580356){if(_0x574956[_0x3f7f('0x48')]['id']){delete _0x574956[_0x3f7f('0x48')]['id'];}return db[_0x3f7f('0x2a')][_0x3f7f('0x46')]({'where':{'id':_0x574956['params']['id']}})[_0x3f7f('0x24')](handleEntityNotFound(_0x580356,null))[_0x3f7f('0x24')](saveUpdates(_0x574956[_0x3f7f('0x48')],null))[_0x3f7f('0x24')](respondWithResult(_0x580356,null))[_0x3f7f('0x43')](handleError(_0x580356,null));};exports['destroy']=function(_0x14fadd,_0x1e7378){return db[_0x3f7f('0x2a')][_0x3f7f('0x46')]({'where':{'id':_0x14fadd['params']['id']}})[_0x3f7f('0x24')](handleEntityNotFound(_0x1e7378,null))['then'](removeEntity(_0x1e7378,null))[_0x3f7f('0x43')](handleError(_0x1e7378,null));};
\ No newline at end of file