Built motion from commit 10af8726.|2.6.34
[motion2.git] / server / api / intFreshdeskField / intFreshdeskField.controller.js
index a07629a..25055bf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3c81=['apply','reject','save','update','then','destroy','end','error','name','send','map','FreshdeskField','fieldName','model','query','keys','filters','intersection','attributes','fields','nolimit','order','sort','where','filter','merge','type','includeAll','include','findAll','rows','catch','show','params','rawAttributes','options','create','body','find','eml-format','rimraf','fast-json-patch','request-promise','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3c81,0x102));var _0x13c8=function(_0x4256d2,_0x5abc40){_0x4256d2=_0x4256d2-0x0;var _0x78d056=_0x3c81[_0x4256d2];return _0x78d056;};'use strict';var emlformat=require(_0x13c8('0x0'));var rimraf=require(_0x13c8('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x13c8('0x2'));var rp=require(_0x13c8('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x13c8('0x4'));var sox=require(_0x13c8('0x5'));var csv=require(_0x13c8('0x6'));var ejs=require(_0x13c8('0x7'));var fs=require('fs');var fs_extra=require(_0x13c8('0x8'));var _=require(_0x13c8('0x9'));var squel=require(_0x13c8('0xa'));var crypto=require('crypto');var jsforce=require(_0x13c8('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x13c8('0x6'));var querystring=require(_0x13c8('0xc'));var Papa=require(_0x13c8('0xd'));var Redis=require(_0x13c8('0xe'));var authService=require(_0x13c8('0xf'));var qs=require(_0x13c8('0x10'));var as=require(_0x13c8('0x11'));var hardwareService=require(_0x13c8('0x12'));var logger=require(_0x13c8('0x13'))(_0x13c8('0x14'));var utils=require(_0x13c8('0x15'));var config=require(_0x13c8('0x16'));var licenseUtil=require(_0x13c8('0x17'));var db=require(_0x13c8('0x18'))['db'];function respondWithStatusCode(_0x5ab91d,_0x21442d){_0x21442d=_0x21442d||0xcc;return function(_0x7b6da8){if(_0x7b6da8){return _0x5ab91d[_0x13c8('0x19')](_0x21442d);}return _0x5ab91d[_0x13c8('0x1a')](_0x21442d)['end']();};}function respondWithResult(_0x42955d,_0x515681){_0x515681=_0x515681||0xc8;return function(_0x4d7a88){if(_0x4d7a88){return _0x42955d['status'](_0x515681)[_0x13c8('0x1b')](_0x4d7a88);}};}function respondWithFilteredResult(_0x5e0e06,_0x337397){return function(_0x17a3c1){if(_0x17a3c1){var _0x23f64e=typeof _0x337397[_0x13c8('0x1c')]==='undefined'&&typeof _0x337397[_0x13c8('0x1d')]===_0x13c8('0x1e');var _0x31ae02=_0x17a3c1[_0x13c8('0x1f')];var _0xce1ad2=_0x23f64e?0x0:_0x337397[_0x13c8('0x1c')];var _0x346417=_0x23f64e?_0x17a3c1[_0x13c8('0x1f')]:_0x337397[_0x13c8('0x1c')]+_0x337397[_0x13c8('0x1d')];var _0xe9386a;if(_0x346417>=_0x31ae02){_0x346417=_0x31ae02;_0xe9386a=0xc8;}else{_0xe9386a=0xce;}_0x5e0e06['status'](_0xe9386a);return _0x5e0e06[_0x13c8('0x20')](_0x13c8('0x21'),_0xce1ad2+'-'+_0x346417+'/'+_0x31ae02)[_0x13c8('0x1b')](_0x17a3c1);}return null;};}function patchUpdates(_0x313ea3){return function(_0x513085){try{jsonpatch[_0x13c8('0x22')](_0x513085,_0x313ea3,!![]);}catch(_0x3c4603){return BPromise[_0x13c8('0x23')](_0x3c4603);}return _0x513085[_0x13c8('0x24')]();};}function saveUpdates(_0x436d5d,_0x2fc123){return function(_0x5ab47f){if(_0x5ab47f){return _0x5ab47f[_0x13c8('0x25')](_0x436d5d)[_0x13c8('0x26')](function(_0x315d6c){return _0x315d6c;});}return null;};}function removeEntity(_0xcf41d2,_0x577df6){return function(_0x1770e5){if(_0x1770e5){return _0x1770e5[_0x13c8('0x27')]()['then'](function(){_0xcf41d2['status'](0xcc)[_0x13c8('0x28')]();});}};}function handleEntityNotFound(_0x4aff35,_0x47e8ae){return function(_0x5ad0dc){if(!_0x5ad0dc){_0x4aff35[_0x13c8('0x19')](0x194);}return _0x5ad0dc;};}function handleError(_0xc7f1b6,_0x53ada9){_0x53ada9=_0x53ada9||0x1f4;return function(_0x4df077){logger[_0x13c8('0x29')](_0x4df077['stack']);if(_0x4df077['name']){delete _0x4df077[_0x13c8('0x2a')];}_0xc7f1b6[_0x13c8('0x1a')](_0x53ada9)[_0x13c8('0x2b')](_0x4df077);};}exports['index']=function(_0x5ef2f7,_0x277a89){var _0x1071a0={},_0x399840={},_0x441182={'count':0x0,'rows':[]};var _0x138017=_[_0x13c8('0x2c')](db[_0x13c8('0x2d')]['rawAttributes'],function(_0x109cb8){return{'name':_0x109cb8[_0x13c8('0x2e')],'type':_0x109cb8['type']['key']};});_0x399840[_0x13c8('0x2f')]=_[_0x13c8('0x2c')](_0x138017,'name');_0x399840[_0x13c8('0x30')]=_[_0x13c8('0x31')](_0x5ef2f7['query']);_0x399840[_0x13c8('0x32')]=_[_0x13c8('0x33')](_0x399840[_0x13c8('0x2f')],_0x399840[_0x13c8('0x30')]);_0x1071a0[_0x13c8('0x34')]=_[_0x13c8('0x33')](_0x399840[_0x13c8('0x2f')],qs[_0x13c8('0x35')](_0x5ef2f7['query']['fields']));_0x1071a0[_0x13c8('0x34')]=_0x1071a0[_0x13c8('0x34')]['length']?_0x1071a0[_0x13c8('0x34')]:_0x399840['model'];if(!_0x5ef2f7[_0x13c8('0x30')]['hasOwnProperty'](_0x13c8('0x36'))){_0x1071a0[_0x13c8('0x1d')]=qs[_0x13c8('0x1d')](_0x5ef2f7[_0x13c8('0x30')][_0x13c8('0x1d')]);_0x1071a0[_0x13c8('0x1c')]=qs[_0x13c8('0x1c')](_0x5ef2f7['query'][_0x13c8('0x1c')]);}_0x1071a0[_0x13c8('0x37')]=qs['sort'](_0x5ef2f7[_0x13c8('0x30')][_0x13c8('0x38')]);_0x1071a0[_0x13c8('0x39')]=qs['filters'](_['pick'](_0x5ef2f7['query'],_0x399840[_0x13c8('0x32')]),_0x138017);if(_0x5ef2f7[_0x13c8('0x30')][_0x13c8('0x3a')]){_0x1071a0[_0x13c8('0x39')]=_[_0x13c8('0x3b')](_0x1071a0[_0x13c8('0x39')],{'$or':_[_0x13c8('0x2c')](_0x138017,function(_0xe19858){if(_0xe19858[_0x13c8('0x3c')]!=='VIRTUAL'){var _0x5b2a28={};_0x5b2a28[_0xe19858[_0x13c8('0x2a')]]={'$like':'%'+_0x5ef2f7[_0x13c8('0x30')][_0x13c8('0x3a')]+'%'};return _0x5b2a28;}})});}_0x1071a0=_[_0x13c8('0x3b')]({},_0x1071a0,_0x5ef2f7['options']);var _0x35e1e7={'where':_0x1071a0['where']};return db[_0x13c8('0x2d')][_0x13c8('0x1f')](_0x35e1e7)[_0x13c8('0x26')](function(_0x1cd02c){_0x441182[_0x13c8('0x1f')]=_0x1cd02c;if(_0x5ef2f7[_0x13c8('0x30')][_0x13c8('0x3d')]){_0x1071a0[_0x13c8('0x3e')]=[{'all':!![]}];}return db[_0x13c8('0x2d')][_0x13c8('0x3f')](_0x1071a0);})[_0x13c8('0x26')](function(_0x416169){_0x441182[_0x13c8('0x40')]=_0x416169;return _0x441182;})[_0x13c8('0x26')](respondWithFilteredResult(_0x277a89,_0x1071a0))[_0x13c8('0x41')](handleError(_0x277a89,null));};exports[_0x13c8('0x42')]=function(_0x1b2ada,_0x1505fb){var _0xc5eb86={'raw':!![],'where':{'id':_0x1b2ada[_0x13c8('0x43')]['id']}},_0x1cff99={};_0x1cff99[_0x13c8('0x2f')]=_[_0x13c8('0x31')](db[_0x13c8('0x2d')][_0x13c8('0x44')]);_0x1cff99['query']=_[_0x13c8('0x31')](_0x1b2ada[_0x13c8('0x30')]);_0x1cff99[_0x13c8('0x32')]=_[_0x13c8('0x33')](_0x1cff99[_0x13c8('0x2f')],_0x1cff99['query']);_0xc5eb86['attributes']=_[_0x13c8('0x33')](_0x1cff99[_0x13c8('0x2f')],qs[_0x13c8('0x35')](_0x1b2ada['query']['fields']));_0xc5eb86['attributes']=_0xc5eb86[_0x13c8('0x34')]['length']?_0xc5eb86[_0x13c8('0x34')]:_0x1cff99['model'];if(_0x1b2ada[_0x13c8('0x30')][_0x13c8('0x3d')]){_0xc5eb86[_0x13c8('0x3e')]=[{'all':!![]}];}_0xc5eb86=_[_0x13c8('0x3b')]({},_0xc5eb86,_0x1b2ada[_0x13c8('0x45')]);return db[_0x13c8('0x2d')]['find'](_0xc5eb86)[_0x13c8('0x26')](handleEntityNotFound(_0x1505fb,null))[_0x13c8('0x26')](respondWithResult(_0x1505fb,null))['catch'](handleError(_0x1505fb,null));};exports[_0x13c8('0x46')]=function(_0x26155d,_0x2e925f){return db[_0x13c8('0x2d')][_0x13c8('0x46')](_0x26155d['body'],{})[_0x13c8('0x26')](respondWithResult(_0x2e925f,0xc9))[_0x13c8('0x41')](handleError(_0x2e925f,null));};exports[_0x13c8('0x25')]=function(_0x38418b,_0x185d18){if(_0x38418b['body']['id']){delete _0x38418b[_0x13c8('0x47')]['id'];}return db[_0x13c8('0x2d')][_0x13c8('0x48')]({'where':{'id':_0x38418b[_0x13c8('0x43')]['id']}})[_0x13c8('0x26')](handleEntityNotFound(_0x185d18,null))[_0x13c8('0x26')](saveUpdates(_0x38418b[_0x13c8('0x47')],null))[_0x13c8('0x26')](respondWithResult(_0x185d18,null))[_0x13c8('0x41')](handleError(_0x185d18,null));};exports[_0x13c8('0x27')]=function(_0x266f4e,_0x5e1fe5){return db[_0x13c8('0x2d')][_0x13c8('0x48')]({'where':{'id':_0x266f4e[_0x13c8('0x43')]['id']}})[_0x13c8('0x26')](handleEntityNotFound(_0x5e1fe5,null))[_0x13c8('0x26')](removeEntity(_0x5e1fe5,null))[_0x13c8('0x41')](handleError(_0x5e1fe5,null));};
\ No newline at end of file
+var _0xca66=['ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','destroy','then','sendStatus','name','send','FreshdeskField','rawAttributes','fieldName','key','model','map','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','where','type','VIRTUAL','merge','includeAll','include','rows','catch','params','find','create','body','eml-format','fast-json-patch','request-promise','moment','mustache','path','to-csv'];(function(_0xbe78fe,_0x39f9d7){var _0x49b0cb=function(_0x44dd07){while(--_0x44dd07){_0xbe78fe['push'](_0xbe78fe['shift']());}};_0x49b0cb(++_0x39f9d7);}(_0xca66,0x8b));var _0x6ca6=function(_0xb639a3,_0xc9f449){_0xb639a3=_0xb639a3-0x0;var _0x39b531=_0xca66[_0xb639a3];return _0x39b531;};'use strict';var emlformat=require(_0x6ca6('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x6ca6('0x1'));var rp=require(_0x6ca6('0x2'));var moment=require(_0x6ca6('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x6ca6('0x4'));var util=require('util');var path=require(_0x6ca6('0x5'));var sox=require('sox');var csv=require(_0x6ca6('0x6'));var ejs=require(_0x6ca6('0x7'));var fs=require('fs');var fs_extra=require(_0x6ca6('0x8'));var _=require(_0x6ca6('0x9'));var squel=require(_0x6ca6('0xa'));var crypto=require(_0x6ca6('0xb'));var jsforce=require(_0x6ca6('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x6ca6('0x6'));var querystring=require(_0x6ca6('0xd'));var Papa=require(_0x6ca6('0xe'));var Redis=require(_0x6ca6('0xf'));var authService=require(_0x6ca6('0x10'));var qs=require(_0x6ca6('0x11'));var as=require(_0x6ca6('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6ca6('0x13'))(_0x6ca6('0x14'));var utils=require(_0x6ca6('0x15'));var config=require(_0x6ca6('0x16'));var licenseUtil=require(_0x6ca6('0x17'));var db=require(_0x6ca6('0x18'))['db'];function respondWithStatusCode(_0x4c05e9,_0x152e63){_0x152e63=_0x152e63||0xcc;return function(_0x38de67){if(_0x38de67){return _0x4c05e9['sendStatus'](_0x152e63);}return _0x4c05e9[_0x6ca6('0x19')](_0x152e63)[_0x6ca6('0x1a')]();};}function respondWithResult(_0x3f417f,_0x3570f1){_0x3570f1=_0x3570f1||0xc8;return function(_0xc774c){if(_0xc774c){return _0x3f417f[_0x6ca6('0x19')](_0x3570f1)['json'](_0xc774c);}};}function respondWithFilteredResult(_0x52c59a,_0x5785b1){return function(_0x36ff3e){if(_0x36ff3e){var _0x19e94f=typeof _0x5785b1[_0x6ca6('0x1b')]===_0x6ca6('0x1c')&&typeof _0x5785b1[_0x6ca6('0x1d')]===_0x6ca6('0x1c');var _0x25dc6c=_0x36ff3e['count'];var _0x2391ce=_0x19e94f?0x0:_0x5785b1[_0x6ca6('0x1b')];var _0xc97f0=_0x19e94f?_0x36ff3e[_0x6ca6('0x1e')]:_0x5785b1[_0x6ca6('0x1b')]+_0x5785b1[_0x6ca6('0x1d')];var _0x16a3d7;if(_0xc97f0>=_0x25dc6c){_0xc97f0=_0x25dc6c;_0x16a3d7=0xc8;}else{_0x16a3d7=0xce;}_0x52c59a[_0x6ca6('0x19')](_0x16a3d7);return _0x52c59a[_0x6ca6('0x1f')](_0x6ca6('0x20'),_0x2391ce+'-'+_0xc97f0+'/'+_0x25dc6c)[_0x6ca6('0x21')](_0x36ff3e);}return null;};}function patchUpdates(_0x4c3be9){return function(_0x28a982){try{jsonpatch[_0x6ca6('0x22')](_0x28a982,_0x4c3be9,!![]);}catch(_0x38cad4){return BPromise[_0x6ca6('0x23')](_0x38cad4);}return _0x28a982[_0x6ca6('0x24')]();};}function saveUpdates(_0x438694,_0x593f15){return function(_0xfb962d){if(_0xfb962d){return _0xfb962d[_0x6ca6('0x25')](_0x438694)['then'](function(_0x4927c1){return _0x4927c1;});}return null;};}function removeEntity(_0xfbf496,_0x216701){return function(_0xfe0760){if(_0xfe0760){return _0xfe0760[_0x6ca6('0x26')]()[_0x6ca6('0x27')](function(){_0xfbf496['status'](0xcc)[_0x6ca6('0x1a')]();});}};}function handleEntityNotFound(_0x1d6caa,_0x1c43ee){return function(_0x2d8c64){if(!_0x2d8c64){_0x1d6caa[_0x6ca6('0x28')](0x194);}return _0x2d8c64;};}function handleError(_0x29f37e,_0x3c32ae){_0x3c32ae=_0x3c32ae||0x1f4;return function(_0x2a1e2d){logger['error'](_0x2a1e2d['stack']);if(_0x2a1e2d[_0x6ca6('0x29')]){delete _0x2a1e2d[_0x6ca6('0x29')];}_0x29f37e[_0x6ca6('0x19')](_0x3c32ae)[_0x6ca6('0x2a')](_0x2a1e2d);};}exports['index']=function(_0x5ea6f7,_0x306583){var _0x47cf48={},_0x4ab84c={},_0x141e78={'count':0x0,'rows':[]};var _0xefd407=_['map'](db[_0x6ca6('0x2b')][_0x6ca6('0x2c')],function(_0xac50e8){return{'name':_0xac50e8[_0x6ca6('0x2d')],'type':_0xac50e8['type'][_0x6ca6('0x2e')]};});_0x4ab84c[_0x6ca6('0x2f')]=_[_0x6ca6('0x30')](_0xefd407,_0x6ca6('0x29'));_0x4ab84c['query']=_[_0x6ca6('0x31')](_0x5ea6f7[_0x6ca6('0x32')]);_0x4ab84c[_0x6ca6('0x33')]=_[_0x6ca6('0x34')](_0x4ab84c['model'],_0x4ab84c['query']);_0x47cf48['attributes']=_['intersection'](_0x4ab84c['model'],qs[_0x6ca6('0x35')](_0x5ea6f7[_0x6ca6('0x32')][_0x6ca6('0x35')]));_0x47cf48['attributes']=_0x47cf48[_0x6ca6('0x36')][_0x6ca6('0x37')]?_0x47cf48[_0x6ca6('0x36')]:_0x4ab84c[_0x6ca6('0x2f')];if(!_0x5ea6f7['query'][_0x6ca6('0x38')](_0x6ca6('0x39'))){_0x47cf48[_0x6ca6('0x1d')]=qs[_0x6ca6('0x1d')](_0x5ea6f7['query'][_0x6ca6('0x1d')]);_0x47cf48['offset']=qs[_0x6ca6('0x1b')](_0x5ea6f7['query']['offset']);}_0x47cf48[_0x6ca6('0x3a')]=qs[_0x6ca6('0x3b')](_0x5ea6f7[_0x6ca6('0x32')][_0x6ca6('0x3b')]);_0x47cf48['where']=qs['filters'](_[_0x6ca6('0x3c')](_0x5ea6f7[_0x6ca6('0x32')],_0x4ab84c['filters']),_0xefd407);if(_0x5ea6f7[_0x6ca6('0x32')]['filter']){_0x47cf48[_0x6ca6('0x3d')]=_['merge'](_0x47cf48[_0x6ca6('0x3d')],{'$or':_[_0x6ca6('0x30')](_0xefd407,function(_0x254733){if(_0x254733[_0x6ca6('0x3e')]!==_0x6ca6('0x3f')){var _0x3ca258={};_0x3ca258[_0x254733[_0x6ca6('0x29')]]={'$like':'%'+_0x5ea6f7[_0x6ca6('0x32')]['filter']+'%'};return _0x3ca258;}})});}_0x47cf48=_[_0x6ca6('0x40')]({},_0x47cf48,_0x5ea6f7['options']);var _0x57186c={'where':_0x47cf48[_0x6ca6('0x3d')]};return db[_0x6ca6('0x2b')]['count'](_0x57186c)[_0x6ca6('0x27')](function(_0x500ed4){_0x141e78[_0x6ca6('0x1e')]=_0x500ed4;if(_0x5ea6f7[_0x6ca6('0x32')][_0x6ca6('0x41')]){_0x47cf48[_0x6ca6('0x42')]=[{'all':!![]}];}return db['FreshdeskField']['findAll'](_0x47cf48);})[_0x6ca6('0x27')](function(_0x3813d6){_0x141e78[_0x6ca6('0x43')]=_0x3813d6;return _0x141e78;})[_0x6ca6('0x27')](respondWithFilteredResult(_0x306583,_0x47cf48))[_0x6ca6('0x44')](handleError(_0x306583,null));};exports['show']=function(_0x76db8d,_0x2ffdfc){var _0x5bed6e={'raw':!![],'where':{'id':_0x76db8d[_0x6ca6('0x45')]['id']}},_0x317b5e={};_0x317b5e[_0x6ca6('0x2f')]=_[_0x6ca6('0x31')](db[_0x6ca6('0x2b')][_0x6ca6('0x2c')]);_0x317b5e[_0x6ca6('0x32')]=_[_0x6ca6('0x31')](_0x76db8d[_0x6ca6('0x32')]);_0x317b5e['filters']=_[_0x6ca6('0x34')](_0x317b5e[_0x6ca6('0x2f')],_0x317b5e[_0x6ca6('0x32')]);_0x5bed6e[_0x6ca6('0x36')]=_[_0x6ca6('0x34')](_0x317b5e[_0x6ca6('0x2f')],qs[_0x6ca6('0x35')](_0x76db8d[_0x6ca6('0x32')]['fields']));_0x5bed6e['attributes']=_0x5bed6e[_0x6ca6('0x36')][_0x6ca6('0x37')]?_0x5bed6e[_0x6ca6('0x36')]:_0x317b5e[_0x6ca6('0x2f')];if(_0x76db8d[_0x6ca6('0x32')][_0x6ca6('0x41')]){_0x5bed6e[_0x6ca6('0x42')]=[{'all':!![]}];}_0x5bed6e=_['merge']({},_0x5bed6e,_0x76db8d['options']);return db[_0x6ca6('0x2b')][_0x6ca6('0x46')](_0x5bed6e)['then'](handleEntityNotFound(_0x2ffdfc,null))[_0x6ca6('0x27')](respondWithResult(_0x2ffdfc,null))[_0x6ca6('0x44')](handleError(_0x2ffdfc,null));};exports[_0x6ca6('0x47')]=function(_0x34a388,_0xc1928f){return db[_0x6ca6('0x2b')][_0x6ca6('0x47')](_0x34a388['body'],{})[_0x6ca6('0x27')](respondWithResult(_0xc1928f,0xc9))[_0x6ca6('0x44')](handleError(_0xc1928f,null));};exports[_0x6ca6('0x25')]=function(_0x4fde51,_0x408df3){if(_0x4fde51['body']['id']){delete _0x4fde51[_0x6ca6('0x48')]['id'];}return db['FreshdeskField']['find']({'where':{'id':_0x4fde51['params']['id']}})[_0x6ca6('0x27')](handleEntityNotFound(_0x408df3,null))[_0x6ca6('0x27')](saveUpdates(_0x4fde51[_0x6ca6('0x48')],null))['then'](respondWithResult(_0x408df3,null))[_0x6ca6('0x44')](handleError(_0x408df3,null));};exports['destroy']=function(_0x1f552d,_0x1010a6){return db[_0x6ca6('0x2b')][_0x6ca6('0x46')]({'where':{'id':_0x1f552d[_0x6ca6('0x45')]['id']}})[_0x6ca6('0x27')](handleEntityNotFound(_0x1010a6,null))[_0x6ca6('0x27')](removeEntity(_0x1010a6,null))[_0x6ca6('0x44')](handleError(_0x1010a6,null));};
\ No newline at end of file