Built motion from commit 449495f6.|2.6.27
[motion2.git] / server / api / smsApplication / smsApplication.controller.js
index 987c509..92359dd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf581=['where','VIRTUAL','options','include','findAll','rows','catch','show','includeAll','create','body','update','find','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','count','offset','set','Content-Range','apply','reject','save','then','destroy','error','stack','name','send','index','SmsApplication','rawAttributes','fieldName','type','key','model','map','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','limit','order','sort','pick','filter','merge'];(function(_0x4f385f,_0x2c6e4a){var _0x243611=function(_0x38c24d){while(--_0x38c24d){_0x4f385f['push'](_0x4f385f['shift']());}};_0x243611(++_0x2c6e4a);}(_0xf581,0x152));var _0x1f58=function(_0x141f1b,_0x5a0aa6){_0x141f1b=_0x141f1b-0x0;var _0x2f771b=_0xf581[_0x141f1b];return _0x2f771b;};'use strict';var emlformat=require(_0x1f58('0x0'));var rimraf=require(_0x1f58('0x1'));var zipdir=require(_0x1f58('0x2'));var jsonpatch=require(_0x1f58('0x3'));var rp=require(_0x1f58('0x4'));var moment=require(_0x1f58('0x5'));var BPromise=require(_0x1f58('0x6'));var Mustache=require(_0x1f58('0x7'));var util=require('util');var path=require('path');var sox=require(_0x1f58('0x8'));var csv=require(_0x1f58('0x9'));var ejs=require(_0x1f58('0xa'));var fs=require('fs');var fs_extra=require(_0x1f58('0xb'));var _=require(_0x1f58('0xc'));var squel=require(_0x1f58('0xd'));var crypto=require(_0x1f58('0xe'));var jsforce=require(_0x1f58('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x1f58('0x9'));var querystring=require(_0x1f58('0x10'));var Papa=require(_0x1f58('0x11'));var Redis=require('ioredis');var authService=require(_0x1f58('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x1f58('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x1f58('0x14'))(_0x1f58('0x15'));var utils=require(_0x1f58('0x16'));var config=require(_0x1f58('0x17'));var licenseUtil=require(_0x1f58('0x18'));var db=require(_0x1f58('0x19'))['db'];function respondWithStatusCode(_0x45729f,_0x40289b){_0x40289b=_0x40289b||0xcc;return function(_0x5415e9){if(_0x5415e9){return _0x45729f[_0x1f58('0x1a')](_0x40289b);}return _0x45729f[_0x1f58('0x1b')](_0x40289b)[_0x1f58('0x1c')]();};}function respondWithResult(_0x3c017d,_0x58844a){_0x58844a=_0x58844a||0xc8;return function(_0xe2e496){if(_0xe2e496){return _0x3c017d[_0x1f58('0x1b')](_0x58844a)[_0x1f58('0x1d')](_0xe2e496);}};}function respondWithFilteredResult(_0x46b467,_0x155e71){return function(_0x4f9644){if(_0x4f9644){var _0x44ea16=typeof _0x155e71['offset']===_0x1f58('0x1e')&&typeof _0x155e71['limit']===_0x1f58('0x1e');var _0x33d26b=_0x4f9644[_0x1f58('0x1f')];var _0x4904d3=_0x44ea16?0x0:_0x155e71[_0x1f58('0x20')];var _0x9c69f5=_0x44ea16?_0x4f9644[_0x1f58('0x1f')]:_0x155e71[_0x1f58('0x20')]+_0x155e71['limit'];var _0x5606d0;if(_0x9c69f5>=_0x33d26b){_0x9c69f5=_0x33d26b;_0x5606d0=0xc8;}else{_0x5606d0=0xce;}_0x46b467[_0x1f58('0x1b')](_0x5606d0);return _0x46b467[_0x1f58('0x21')](_0x1f58('0x22'),_0x4904d3+'-'+_0x9c69f5+'/'+_0x33d26b)[_0x1f58('0x1d')](_0x4f9644);}return null;};}function patchUpdates(_0x5c5933){return function(_0x3497f2){try{jsonpatch[_0x1f58('0x23')](_0x3497f2,_0x5c5933,!![]);}catch(_0x12bc5d){return BPromise[_0x1f58('0x24')](_0x12bc5d);}return _0x3497f2[_0x1f58('0x25')]();};}function saveUpdates(_0x23068b,_0x48e923){return function(_0x51ebbb){if(_0x51ebbb){return _0x51ebbb['update'](_0x23068b)[_0x1f58('0x26')](function(_0x25e063){return _0x25e063;});}return null;};}function removeEntity(_0x232014,_0x3249ff){return function(_0x516833){if(_0x516833){return _0x516833[_0x1f58('0x27')]()['then'](function(){_0x232014[_0x1f58('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x46a1db,_0xf4393f){return function(_0x2e742e){if(!_0x2e742e){_0x46a1db[_0x1f58('0x1a')](0x194);}return _0x2e742e;};}function handleError(_0x2a2772,_0x3986bb){_0x3986bb=_0x3986bb||0x1f4;return function(_0x25dce1){logger[_0x1f58('0x28')](_0x25dce1[_0x1f58('0x29')]);if(_0x25dce1[_0x1f58('0x2a')]){delete _0x25dce1[_0x1f58('0x2a')];}_0x2a2772['status'](_0x3986bb)[_0x1f58('0x2b')](_0x25dce1);};}exports[_0x1f58('0x2c')]=function(_0x38e0ed,_0x1d4769){var _0x4b51d8={},_0x29d3a9={},_0x16c86e={'count':0x0,'rows':[]};var _0x2a4ef4=_['map'](db[_0x1f58('0x2d')][_0x1f58('0x2e')],function(_0x14c5ce){return{'name':_0x14c5ce[_0x1f58('0x2f')],'type':_0x14c5ce[_0x1f58('0x30')][_0x1f58('0x31')]};});_0x29d3a9[_0x1f58('0x32')]=_[_0x1f58('0x33')](_0x2a4ef4,_0x1f58('0x2a'));_0x29d3a9[_0x1f58('0x34')]=_[_0x1f58('0x35')](_0x38e0ed[_0x1f58('0x34')]);_0x29d3a9[_0x1f58('0x36')]=_['intersection'](_0x29d3a9[_0x1f58('0x32')],_0x29d3a9['query']);_0x4b51d8[_0x1f58('0x37')]=_[_0x1f58('0x38')](_0x29d3a9[_0x1f58('0x32')],qs[_0x1f58('0x39')](_0x38e0ed['query'][_0x1f58('0x39')]));_0x4b51d8[_0x1f58('0x37')]=_0x4b51d8['attributes'][_0x1f58('0x3a')]?_0x4b51d8[_0x1f58('0x37')]:_0x29d3a9[_0x1f58('0x32')];if(!_0x38e0ed['query'][_0x1f58('0x3b')](_0x1f58('0x3c'))){_0x4b51d8[_0x1f58('0x3d')]=qs[_0x1f58('0x3d')](_0x38e0ed[_0x1f58('0x34')][_0x1f58('0x3d')]);_0x4b51d8[_0x1f58('0x20')]=qs[_0x1f58('0x20')](_0x38e0ed[_0x1f58('0x34')]['offset']);}_0x4b51d8[_0x1f58('0x3e')]=qs[_0x1f58('0x3f')](_0x38e0ed[_0x1f58('0x34')][_0x1f58('0x3f')]);_0x4b51d8['where']=qs[_0x1f58('0x36')](_[_0x1f58('0x40')](_0x38e0ed[_0x1f58('0x34')],_0x29d3a9[_0x1f58('0x36')]),_0x2a4ef4);if(_0x38e0ed[_0x1f58('0x34')][_0x1f58('0x41')]){_0x4b51d8['where']=_[_0x1f58('0x42')](_0x4b51d8[_0x1f58('0x43')],{'$or':_[_0x1f58('0x33')](_0x2a4ef4,function(_0xe34361){if(_0xe34361['type']!==_0x1f58('0x44')){var _0x1ffcfd={};_0x1ffcfd[_0xe34361[_0x1f58('0x2a')]]={'$like':'%'+_0x38e0ed['query']['filter']+'%'};return _0x1ffcfd;}})});}_0x4b51d8=_[_0x1f58('0x42')]({},_0x4b51d8,_0x38e0ed[_0x1f58('0x45')]);var _0x308284={'where':_0x4b51d8['where']};return db[_0x1f58('0x2d')][_0x1f58('0x1f')](_0x308284)[_0x1f58('0x26')](function(_0x2d2914){_0x16c86e[_0x1f58('0x1f')]=_0x2d2914;if(_0x38e0ed[_0x1f58('0x34')]['includeAll']){_0x4b51d8[_0x1f58('0x46')]=[{'all':!![]}];}return db[_0x1f58('0x2d')][_0x1f58('0x47')](_0x4b51d8);})['then'](function(_0x4d5577){_0x16c86e[_0x1f58('0x48')]=_0x4d5577;return _0x16c86e;})[_0x1f58('0x26')](respondWithFilteredResult(_0x1d4769,_0x4b51d8))[_0x1f58('0x49')](handleError(_0x1d4769,null));};exports[_0x1f58('0x4a')]=function(_0x477cd8,_0x388dfe){var _0x4e1e7d={'raw':!![],'where':{'id':_0x477cd8['params']['id']}},_0xbcb83b={};_0xbcb83b[_0x1f58('0x32')]=_[_0x1f58('0x35')](db[_0x1f58('0x2d')][_0x1f58('0x2e')]);_0xbcb83b[_0x1f58('0x34')]=_['keys'](_0x477cd8['query']);_0xbcb83b['filters']=_[_0x1f58('0x38')](_0xbcb83b[_0x1f58('0x32')],_0xbcb83b[_0x1f58('0x34')]);_0x4e1e7d[_0x1f58('0x37')]=_[_0x1f58('0x38')](_0xbcb83b[_0x1f58('0x32')],qs[_0x1f58('0x39')](_0x477cd8[_0x1f58('0x34')]['fields']));_0x4e1e7d['attributes']=_0x4e1e7d[_0x1f58('0x37')][_0x1f58('0x3a')]?_0x4e1e7d[_0x1f58('0x37')]:_0xbcb83b[_0x1f58('0x32')];if(_0x477cd8[_0x1f58('0x34')][_0x1f58('0x4b')]){_0x4e1e7d['include']=[{'all':!![]}];}_0x4e1e7d=_[_0x1f58('0x42')]({},_0x4e1e7d,_0x477cd8['options']);return db[_0x1f58('0x2d')]['find'](_0x4e1e7d)[_0x1f58('0x26')](handleEntityNotFound(_0x388dfe,null))[_0x1f58('0x26')](respondWithResult(_0x388dfe,null))[_0x1f58('0x49')](handleError(_0x388dfe,null));};exports[_0x1f58('0x4c')]=function(_0x3db527,_0x74df93){return db[_0x1f58('0x2d')][_0x1f58('0x4c')](_0x3db527[_0x1f58('0x4d')],{})[_0x1f58('0x26')](respondWithResult(_0x74df93,0xc9))[_0x1f58('0x49')](handleError(_0x74df93,null));};exports[_0x1f58('0x4e')]=function(_0x2dba4a,_0x2edf11){if(_0x2dba4a[_0x1f58('0x4d')]['id']){delete _0x2dba4a[_0x1f58('0x4d')]['id'];}return db[_0x1f58('0x2d')][_0x1f58('0x4f')]({'where':{'id':_0x2dba4a[_0x1f58('0x50')]['id']}})[_0x1f58('0x26')](handleEntityNotFound(_0x2edf11,null))['then'](saveUpdates(_0x2dba4a[_0x1f58('0x4d')],null))[_0x1f58('0x26')](respondWithResult(_0x2edf11,null))[_0x1f58('0x49')](handleError(_0x2edf11,null));};exports[_0x1f58('0x27')]=function(_0x5558e1,_0x53c46b){return db[_0x1f58('0x2d')][_0x1f58('0x4f')]({'where':{'id':_0x5558e1[_0x1f58('0x50')]['id']}})[_0x1f58('0x26')](handleEntityNotFound(_0x53c46b,null))[_0x1f58('0x26')](removeEntity(_0x53c46b,null))['catch'](handleError(_0x53c46b,null));};
\ No newline at end of file
+var _0xf7cc=['limit','count','set','Content-Range','apply','reject','update','destroy','then','end','error','stack','name','send','index','map','SmsApplication','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','merge','VIRTUAL','options','include','findAll','catch','show','params','includeAll','create','body','find','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','to-csv','fs-extra','squel','crypto','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','undefined'];(function(_0x3d8251,_0x435dbf){var _0x2ed649=function(_0x229898){while(--_0x229898){_0x3d8251['push'](_0x3d8251['shift']());}};_0x2ed649(++_0x435dbf);}(_0xf7cc,0x167));var _0xcf7c=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0xf7cc[_0x4b369d];return _0x571a98;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xcf7c('0x0'));var zipdir=require(_0xcf7c('0x1'));var jsonpatch=require(_0xcf7c('0x2'));var rp=require(_0xcf7c('0x3'));var moment=require(_0xcf7c('0x4'));var BPromise=require(_0xcf7c('0x5'));var Mustache=require('mustache');var util=require(_0xcf7c('0x6'));var path=require(_0xcf7c('0x7'));var sox=require('sox');var csv=require(_0xcf7c('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xcf7c('0x9'));var _=require('lodash');var squel=require(_0xcf7c('0xa'));var crypto=require(_0xcf7c('0xb'));var jsforce=require(_0xcf7c('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xcf7c('0x8'));var querystring=require(_0xcf7c('0xd'));var Papa=require(_0xcf7c('0xe'));var Redis=require(_0xcf7c('0xf'));var authService=require(_0xcf7c('0x10'));var qs=require(_0xcf7c('0x11'));var as=require(_0xcf7c('0x12'));var hardwareService=require(_0xcf7c('0x13'));var logger=require(_0xcf7c('0x14'))(_0xcf7c('0x15'));var utils=require(_0xcf7c('0x16'));var config=require(_0xcf7c('0x17'));var licenseUtil=require(_0xcf7c('0x18'));var db=require(_0xcf7c('0x19'))['db'];function respondWithStatusCode(_0x3a09a1,_0x47cbf3){_0x47cbf3=_0x47cbf3||0xcc;return function(_0x5b3248){if(_0x5b3248){return _0x3a09a1[_0xcf7c('0x1a')](_0x47cbf3);}return _0x3a09a1[_0xcf7c('0x1b')](_0x47cbf3)['end']();};}function respondWithResult(_0x2fe120,_0x1badfe){_0x1badfe=_0x1badfe||0xc8;return function(_0x2d852a){if(_0x2d852a){return _0x2fe120[_0xcf7c('0x1b')](_0x1badfe)[_0xcf7c('0x1c')](_0x2d852a);}};}function respondWithFilteredResult(_0xc8c43e,_0x513f20){return function(_0x2d422e){if(_0x2d422e){var _0x52af23=typeof _0x513f20[_0xcf7c('0x1d')]===_0xcf7c('0x1e')&&typeof _0x513f20[_0xcf7c('0x1f')]==='undefined';var _0x1c525d=_0x2d422e[_0xcf7c('0x20')];var _0x593307=_0x52af23?0x0:_0x513f20[_0xcf7c('0x1d')];var _0x4202f4=_0x52af23?_0x2d422e['count']:_0x513f20[_0xcf7c('0x1d')]+_0x513f20[_0xcf7c('0x1f')];var _0x5d400e;if(_0x4202f4>=_0x1c525d){_0x4202f4=_0x1c525d;_0x5d400e=0xc8;}else{_0x5d400e=0xce;}_0xc8c43e[_0xcf7c('0x1b')](_0x5d400e);return _0xc8c43e[_0xcf7c('0x21')](_0xcf7c('0x22'),_0x593307+'-'+_0x4202f4+'/'+_0x1c525d)['json'](_0x2d422e);}return null;};}function patchUpdates(_0x21fb2c){return function(_0x541412){try{jsonpatch[_0xcf7c('0x23')](_0x541412,_0x21fb2c,!![]);}catch(_0x47e7b2){return BPromise[_0xcf7c('0x24')](_0x47e7b2);}return _0x541412['save']();};}function saveUpdates(_0x35b3fb,_0x28b517){return function(_0x4cab9c){if(_0x4cab9c){return _0x4cab9c[_0xcf7c('0x25')](_0x35b3fb)['then'](function(_0x59b0c1){return _0x59b0c1;});}return null;};}function removeEntity(_0x3e300b,_0x1f7fef){return function(_0x30f94a){if(_0x30f94a){return _0x30f94a[_0xcf7c('0x26')]()[_0xcf7c('0x27')](function(){_0x3e300b['status'](0xcc)[_0xcf7c('0x28')]();});}};}function handleEntityNotFound(_0x1de6b2,_0x34c4a1){return function(_0x23a25f){if(!_0x23a25f){_0x1de6b2['sendStatus'](0x194);}return _0x23a25f;};}function handleError(_0x37e033,_0x5e3cbe){_0x5e3cbe=_0x5e3cbe||0x1f4;return function(_0x54b692){logger[_0xcf7c('0x29')](_0x54b692[_0xcf7c('0x2a')]);if(_0x54b692[_0xcf7c('0x2b')]){delete _0x54b692[_0xcf7c('0x2b')];}_0x37e033[_0xcf7c('0x1b')](_0x5e3cbe)[_0xcf7c('0x2c')](_0x54b692);};}exports[_0xcf7c('0x2d')]=function(_0x26af32,_0x505e99){var _0x9e44ba={},_0xe296b8={},_0x348d0d={'count':0x0,'rows':[]};var _0x186ff2=_[_0xcf7c('0x2e')](db[_0xcf7c('0x2f')][_0xcf7c('0x30')],function(_0x44b122){return{'name':_0x44b122[_0xcf7c('0x31')],'type':_0x44b122[_0xcf7c('0x32')][_0xcf7c('0x33')]};});_0xe296b8[_0xcf7c('0x34')]=_['map'](_0x186ff2,'name');_0xe296b8[_0xcf7c('0x35')]=_[_0xcf7c('0x36')](_0x26af32[_0xcf7c('0x35')]);_0xe296b8[_0xcf7c('0x37')]=_[_0xcf7c('0x38')](_0xe296b8[_0xcf7c('0x34')],_0xe296b8[_0xcf7c('0x35')]);_0x9e44ba[_0xcf7c('0x39')]=_[_0xcf7c('0x38')](_0xe296b8[_0xcf7c('0x34')],qs['fields'](_0x26af32[_0xcf7c('0x35')][_0xcf7c('0x3a')]));_0x9e44ba['attributes']=_0x9e44ba[_0xcf7c('0x39')][_0xcf7c('0x3b')]?_0x9e44ba['attributes']:_0xe296b8[_0xcf7c('0x34')];if(!_0x26af32[_0xcf7c('0x35')][_0xcf7c('0x3c')](_0xcf7c('0x3d'))){_0x9e44ba[_0xcf7c('0x1f')]=qs[_0xcf7c('0x1f')](_0x26af32['query'][_0xcf7c('0x1f')]);_0x9e44ba['offset']=qs[_0xcf7c('0x1d')](_0x26af32['query']['offset']);}_0x9e44ba[_0xcf7c('0x3e')]=qs[_0xcf7c('0x3f')](_0x26af32[_0xcf7c('0x35')][_0xcf7c('0x3f')]);_0x9e44ba['where']=qs['filters'](_[_0xcf7c('0x40')](_0x26af32[_0xcf7c('0x35')],_0xe296b8[_0xcf7c('0x37')]),_0x186ff2);if(_0x26af32[_0xcf7c('0x35')][_0xcf7c('0x41')]){_0x9e44ba['where']=_[_0xcf7c('0x42')](_0x9e44ba['where'],{'$or':_[_0xcf7c('0x2e')](_0x186ff2,function(_0x2e407a){if(_0x2e407a[_0xcf7c('0x32')]!==_0xcf7c('0x43')){var _0x42725d={};_0x42725d[_0x2e407a[_0xcf7c('0x2b')]]={'$like':'%'+_0x26af32['query'][_0xcf7c('0x41')]+'%'};return _0x42725d;}})});}_0x9e44ba=_['merge']({},_0x9e44ba,_0x26af32[_0xcf7c('0x44')]);var _0x120159={'where':_0x9e44ba['where']};return db[_0xcf7c('0x2f')][_0xcf7c('0x20')](_0x120159)[_0xcf7c('0x27')](function(_0x3154ef){_0x348d0d[_0xcf7c('0x20')]=_0x3154ef;if(_0x26af32[_0xcf7c('0x35')]['includeAll']){_0x9e44ba[_0xcf7c('0x45')]=[{'all':!![]}];}return db[_0xcf7c('0x2f')][_0xcf7c('0x46')](_0x9e44ba);})[_0xcf7c('0x27')](function(_0x3aef57){_0x348d0d['rows']=_0x3aef57;return _0x348d0d;})['then'](respondWithFilteredResult(_0x505e99,_0x9e44ba))[_0xcf7c('0x47')](handleError(_0x505e99,null));};exports[_0xcf7c('0x48')]=function(_0x316822,_0x3a73d5){var _0x5df8c3={'raw':!![],'where':{'id':_0x316822[_0xcf7c('0x49')]['id']}},_0x313bf5={};_0x313bf5['model']=_['keys'](db['SmsApplication'][_0xcf7c('0x30')]);_0x313bf5[_0xcf7c('0x35')]=_[_0xcf7c('0x36')](_0x316822['query']);_0x313bf5[_0xcf7c('0x37')]=_[_0xcf7c('0x38')](_0x313bf5[_0xcf7c('0x34')],_0x313bf5[_0xcf7c('0x35')]);_0x5df8c3['attributes']=_[_0xcf7c('0x38')](_0x313bf5[_0xcf7c('0x34')],qs[_0xcf7c('0x3a')](_0x316822['query']['fields']));_0x5df8c3[_0xcf7c('0x39')]=_0x5df8c3[_0xcf7c('0x39')][_0xcf7c('0x3b')]?_0x5df8c3[_0xcf7c('0x39')]:_0x313bf5[_0xcf7c('0x34')];if(_0x316822[_0xcf7c('0x35')][_0xcf7c('0x4a')]){_0x5df8c3['include']=[{'all':!![]}];}_0x5df8c3=_['merge']({},_0x5df8c3,_0x316822[_0xcf7c('0x44')]);return db['SmsApplication']['find'](_0x5df8c3)[_0xcf7c('0x27')](handleEntityNotFound(_0x3a73d5,null))[_0xcf7c('0x27')](respondWithResult(_0x3a73d5,null))[_0xcf7c('0x47')](handleError(_0x3a73d5,null));};exports[_0xcf7c('0x4b')]=function(_0x136c76,_0x695b80){return db[_0xcf7c('0x2f')][_0xcf7c('0x4b')](_0x136c76['body'],{})[_0xcf7c('0x27')](respondWithResult(_0x695b80,0xc9))[_0xcf7c('0x47')](handleError(_0x695b80,null));};exports[_0xcf7c('0x25')]=function(_0x317b07,_0x2c1013){if(_0x317b07[_0xcf7c('0x4c')]['id']){delete _0x317b07['body']['id'];}return db[_0xcf7c('0x2f')]['find']({'where':{'id':_0x317b07[_0xcf7c('0x49')]['id']}})['then'](handleEntityNotFound(_0x2c1013,null))[_0xcf7c('0x27')](saveUpdates(_0x317b07['body'],null))[_0xcf7c('0x27')](respondWithResult(_0x2c1013,null))['catch'](handleError(_0x2c1013,null));};exports['destroy']=function(_0x2a265c,_0x557db0){return db[_0xcf7c('0x2f')][_0xcf7c('0x4d')]({'where':{'id':_0x2a265c[_0xcf7c('0x49')]['id']}})[_0xcf7c('0x27')](handleEntityNotFound(_0x557db0,null))[_0xcf7c('0x27')](removeEntity(_0x557db0,null))[_0xcf7c('0x47')](handleError(_0x557db0,null));};
\ No newline at end of file