Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / api / tag / tag.controller.js
index 47d9ea0..5231c03 100644 (file)
@@ -1 +1 @@
-const a622_0x5288=['pick','params','then','findOne','userProfileId','../../components/parsers/qs','model','include','like','filters','intersection','Content-Range','VIRTUAL','filter','json','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','keys','type','map','Tag','rows','limit','set','order','query','end','Unable\x20to\x20retrieve\x20the\x20current\x20user','sendStatus','UserProfileResource','name','api','attributes','merge','../../mysqldb','length','index','undefined','fieldName','autoAssociation','catch','where','rawAttributes','Tags','status','../../config/logger','includeAll','user','nolimit','stack','show','fields','create','options','offset','get','sequelize','update','count','sort','body','destroy','lodash'];(function(_0x41649e,_0x52885a){const _0x4f5800=function(_0x88fb04){while(--_0x88fb04){_0x41649e['push'](_0x41649e['shift']());}};_0x4f5800(++_0x52885a);}(a622_0x5288,0xa1));const a622_0x4f58=function(_0x41649e,_0x52885a){_0x41649e=_0x41649e-0x0;let _0x4f5800=a622_0x5288[_0x41649e];return _0x4f5800;};const _0x2bda46=a622_0x4f58;'use strict';const _=require(_0x2bda46('0x18')),qs=require(_0x2bda46('0x1e')),logger=require(_0x2bda46('0x7'))(_0x2bda46('0x37')),db=require(_0x2bda46('0x3a'))['db'],{Op}=require(_0x2bda46('0x12'));function respondWithResult(_0x88fb04,_0x175e03){return _0x175e03=_0x175e03||0xc8,function(_0x14c536){const _0x49ffc2=a622_0x4f58;if(_0x14c536)return _0x88fb04['status'](_0x175e03)[_0x49ffc2('0x27')](_0x14c536);};}function respondWithFilteredResult(_0x1209af,_0x560972){return function(_0x383063){const _0x177af3=a622_0x4f58;if(_0x383063){const _0x3e908c=_0x383063[_0x177af3('0x14')],_0x54590f=_0x560972[_0x177af3('0x10')];let _0x3be639=_0x560972[_0x177af3('0x10')]+_0x560972['limit'],_0x18b131;return _0x3be639>=_0x3e908c?(_0x3be639=_0x3e908c,_0x18b131=0xc8):_0x18b131=0xce,_0x1209af[_0x177af3('0x6')](_0x18b131),_0x1209af[_0x177af3('0x2f')](_0x177af3('0x24'),_0x54590f+'-'+_0x3be639+'/'+_0x3e908c)[_0x177af3('0x27')](_0x383063);}return null;};}function saveUpdates(_0x533bd2){return function(_0x23753b){const _0x27eb3c=a622_0x4f58;if(_0x23753b)return _0x23753b[_0x27eb3c('0x13')](_0x533bd2)[_0x27eb3c('0x1b')](function(_0x2aa1c){return _0x2aa1c;});return null;};}function removeEntity(_0x1886ad){return function(_0x1e4065){const _0x4a585f=a622_0x4f58;if(_0x1e4065)return _0x1e4065[_0x4a585f('0x17')]()['then'](function(){const _0x10d1f3=_0x4a585f,_0x3c50dd=_0x1e4065['get']({'plain':!![]}),_0x5b019b='Tags';return db['UserProfileResource'][_0x10d1f3('0x17')]({'where':{'type':_0x5b019b,'resourceId':_0x3c50dd['id']}})[_0x10d1f3('0x1b')](function(){return _0x1e4065;});})[_0x4a585f('0x1b')](function(){const _0xac62f9=_0x4a585f;_0x1886ad[_0xac62f9('0x6')](0xcc)[_0xac62f9('0x32')]();});};}function handleEntityNotFound(_0x46c07f){return function(_0x6537be){const _0x556a69=a622_0x4f58;return!_0x6537be&&_0x46c07f[_0x556a69('0x34')](0x194),_0x6537be;};}function handleError(_0x308ef2,_0x563ac1){return _0x563ac1=_0x563ac1||0x1f4,function(_0x476bd1){const _0x179425=a622_0x4f58;logger['error'](_0x476bd1[_0x179425('0xb')]),_0x476bd1[_0x179425('0x36')]&&delete _0x476bd1['name'],_0x308ef2[_0x179425('0x6')](_0x563ac1)['send'](_0x476bd1);};}exports[_0x2bda46('0x3c')]=function(_0x469c99,_0x1c79f4){const _0xac71a6=_0x2bda46;let _0x2f3677={};const _0x2a9ad4={},_0x50ca7c={'count':0x0,'rows':[]},_0x50eecc=_[_0xac71a6('0x2b')](db[_0xac71a6('0x2c')][_0xac71a6('0x4')],function(_0xb95f24){const _0x39556f=_0xac71a6;return{'name':_0xb95f24[_0x39556f('0x0')],'type':_0xb95f24[_0x39556f('0x2a')]['key']};});_0x2a9ad4[_0xac71a6('0x1f')]=_[_0xac71a6('0x2b')](_0x50eecc,_0xac71a6('0x36')),_0x2a9ad4[_0xac71a6('0x31')]=_[_0xac71a6('0x29')](_0x469c99[_0xac71a6('0x31')]),_0x2a9ad4['filters']=_[_0xac71a6('0x23')](_0x2a9ad4[_0xac71a6('0x1f')],_0x2a9ad4['query']),_0x2f3677[_0xac71a6('0x38')]=_[_0xac71a6('0x23')](_0x2a9ad4[_0xac71a6('0x1f')],qs['fields'](_0x469c99[_0xac71a6('0x31')][_0xac71a6('0xd')])),_0x2f3677[_0xac71a6('0x38')]=_0x2f3677[_0xac71a6('0x38')][_0xac71a6('0x3b')]?_0x2f3677['attributes']:_0x2a9ad4[_0xac71a6('0x1f')];typeof _0x469c99[_0xac71a6('0x31')][_0xac71a6('0xa')]===_0xac71a6('0x3d')&&(_0x2f3677[_0xac71a6('0x2e')]=qs[_0xac71a6('0x2e')](_0x469c99[_0xac71a6('0x31')][_0xac71a6('0x2e')]),_0x2f3677[_0xac71a6('0x10')]=qs['offset'](_0x469c99[_0xac71a6('0x31')]['offset']));_0x2f3677[_0xac71a6('0x30')]=qs[_0xac71a6('0x15')](_0x469c99['query'][_0xac71a6('0x15')]),_0x2f3677[_0xac71a6('0x3')]=qs[_0xac71a6('0x22')](_[_0xac71a6('0x19')](_0x469c99[_0xac71a6('0x31')],_0x2a9ad4[_0xac71a6('0x22')]),_0x50eecc);_0x469c99[_0xac71a6('0x31')][_0xac71a6('0x26')]&&(_0x2f3677[_0xac71a6('0x3')]=_[_0xac71a6('0x39')](_0x2f3677[_0xac71a6('0x3')],{[Op['or']]:_['map'](_0x50eecc,function(_0x2ed292){const _0x583726=_0xac71a6;if(_0x2ed292[_0x583726('0x2a')]!==_0x583726('0x25')){const _0x246792={};return _0x246792[_0x2ed292[_0x583726('0x36')]]={[Op[_0x583726('0x21')]]:'%'+_0x469c99[_0x583726('0x31')][_0x583726('0x26')]+'%'},_0x246792;}})}));_0x2f3677=_[_0xac71a6('0x39')]({},_0x2f3677,_0x469c99[_0xac71a6('0xf')]);const _0x4cd2b8={'where':_0x2f3677[_0xac71a6('0x3')]};return db['Tag']['count'](_0x4cd2b8)[_0xac71a6('0x1b')](function(_0x2b1be7){const _0x352b7a=_0xac71a6;return _0x50ca7c[_0x352b7a('0x14')]=_0x2b1be7,_0x469c99[_0x352b7a('0x31')][_0x352b7a('0x8')]&&(_0x2f3677[_0x352b7a('0x20')]=[{'all':!![]}]),db[_0x352b7a('0x2c')]['findAll'](_0x2f3677);})[_0xac71a6('0x1b')](function(_0x54cea6){const _0x16563d=_0xac71a6;return _0x50ca7c[_0x16563d('0x2d')]=_0x54cea6,_0x50ca7c;})['then'](respondWithFilteredResult(_0x1c79f4,_0x2f3677))[_0xac71a6('0x2')](handleError(_0x1c79f4,null));},exports[_0x2bda46('0xc')]=function(_0x32faf1,_0x162990){const _0x27befc=_0x2bda46;let _0x1b6cb8={'raw':!![],'where':{'id':_0x32faf1[_0x27befc('0x1a')]['id']}};const _0x455017={};return _0x455017[_0x27befc('0x1f')]=_[_0x27befc('0x29')](db[_0x27befc('0x2c')][_0x27befc('0x4')]),_0x455017['query']=_[_0x27befc('0x29')](_0x32faf1[_0x27befc('0x31')]),_0x455017[_0x27befc('0x22')]=_['intersection'](_0x455017[_0x27befc('0x1f')],_0x455017[_0x27befc('0x31')]),_0x1b6cb8['attributes']=_['intersection'](_0x455017[_0x27befc('0x1f')],qs['fields'](_0x32faf1[_0x27befc('0x31')]['fields'])),_0x1b6cb8[_0x27befc('0x38')]=_0x1b6cb8[_0x27befc('0x38')][_0x27befc('0x3b')]?_0x1b6cb8['attributes']:_0x455017[_0x27befc('0x1f')],_0x32faf1[_0x27befc('0x31')][_0x27befc('0x8')]&&(_0x1b6cb8[_0x27befc('0x20')]=[{'all':!![]}]),_0x1b6cb8=_[_0x27befc('0x39')]({},_0x1b6cb8,_0x32faf1[_0x27befc('0xf')]),db[_0x27befc('0x2c')]['findOne'](_0x1b6cb8)[_0x27befc('0x1b')](handleEntityNotFound(_0x162990,null))[_0x27befc('0x1b')](respondWithResult(_0x162990,null))[_0x27befc('0x2')](handleError(_0x162990,null));},exports['create']=function(_0x1bf1d9,_0x5e4854){const _0x3961bf=_0x2bda46;return db[_0x3961bf('0x2c')][_0x3961bf('0xe')](_0x1bf1d9[_0x3961bf('0x16')],{})[_0x3961bf('0x1b')](function(_0x119e72){const _0x2218a9=_0x3961bf,_0x433e05=_0x1bf1d9[_0x2218a9('0x9')][_0x2218a9('0x11')]({'plain':!![]});if(!_0x433e05)throw new Error(_0x2218a9('0x33'));if(_0x433e05['role']===_0x2218a9('0x9')){const _0x1c9839=_0x119e72['get']({'plain':!![]}),_0x51f3cd=_0x2218a9('0x5');return db['UserProfileSection'][_0x2218a9('0x1c')]({'where':{'name':_0x51f3cd,'userProfileId':_0x433e05[_0x2218a9('0x1d')]},'raw':!![]})['then'](function(_0x278f4d){const _0x5be6ae=_0x2218a9;return _0x278f4d&&_0x278f4d[_0x5be6ae('0x1')]===0x0?db[_0x5be6ae('0x35')][_0x5be6ae('0xe')]({'name':_0x1c9839[_0x5be6ae('0x36')],'resourceId':_0x1c9839['id'],'type':_0x278f4d[_0x5be6ae('0x36')],'sectionId':_0x278f4d['id']},{})[_0x5be6ae('0x1b')](function(){return _0x119e72;}):_0x119e72;})[_0x2218a9('0x2')](function(_0x4d86d2){const _0xc56933=_0x2218a9;logger['error'](_0xc56933('0x28'),_0x4d86d2);throw _0x4d86d2;});}return _0x119e72;})[_0x3961bf('0x1b')](respondWithResult(_0x5e4854,0xc9))[_0x3961bf('0x2')](handleError(_0x5e4854,null));},exports[_0x2bda46('0x13')]=function(_0x29a3e0,_0x2a0e20){const _0x32af81=_0x2bda46;return _0x29a3e0['body']['id']&&delete _0x29a3e0[_0x32af81('0x16')]['id'],db[_0x32af81('0x2c')][_0x32af81('0x1c')]({'where':{'id':_0x29a3e0['params']['id']}})['then'](handleEntityNotFound(_0x2a0e20,null))[_0x32af81('0x1b')](saveUpdates(_0x29a3e0[_0x32af81('0x16')],null))[_0x32af81('0x1b')](respondWithResult(_0x2a0e20,null))[_0x32af81('0x2')](handleError(_0x2a0e20,null));},exports[_0x2bda46('0x17')]=function(_0x57b429,_0x5b03d7){const _0x9b1997=_0x2bda46;return db[_0x9b1997('0x2c')][_0x9b1997('0x1c')]({'where':{'id':_0x57b429[_0x9b1997('0x1a')]['id']}})[_0x9b1997('0x1b')](handleEntityNotFound(_0x5b03d7,null))['then'](removeEntity(_0x5b03d7,null))['catch'](handleError(_0x5b03d7,null));};
\ No newline at end of file
+const a622_0x3c3e=['catch','Content-Range','pick','VIRTUAL','UserProfileSection','UserProfileResource','status','index','filters','user','filter','where','key','attributes','sendStatus','Tag','Tags','../../config/logger','set','intersection','autoAssociation','sort','order','rawAttributes','stack','type','rows','options','includeAll','map','fields','../../components/parsers/qs','params','limit','keys','api','body','offset','../../mysqldb','create','update','findOne','fieldName','then','name','undefined','query','sequelize','nolimit','destroy','get','count','show','model','lodash','Unable\x20to\x20retrieve\x20the\x20current\x20user','json','merge','role'];(function(_0x5bb38d,_0x3c3ef7){const _0x4879dd=function(_0x553743){while(--_0x553743){_0x5bb38d['push'](_0x5bb38d['shift']());}};_0x4879dd(++_0x3c3ef7);}(a622_0x3c3e,0xa9));const a622_0x4879=function(_0x5bb38d,_0x3c3ef7){_0x5bb38d=_0x5bb38d-0x0;let _0x4879dd=a622_0x3c3e[_0x5bb38d];return _0x4879dd;};const _0x2cbcd7=a622_0x4879;'use strict';const _=require(_0x2cbcd7('0x3')),qs=require(_0x2cbcd7('0x27')),logger=require(_0x2cbcd7('0x19'))(_0x2cbcd7('0x2b')),db=require(_0x2cbcd7('0x2e'))['db'],{Op}=require(_0x2cbcd7('0x37'));function respondWithResult(_0x553743,_0x34f332){return _0x34f332=_0x34f332||0xc8,function(_0x83215){const _0x3f3a16=a622_0x4879;if(_0x83215)return _0x553743[_0x3f3a16('0xe')](_0x34f332)[_0x3f3a16('0x5')](_0x83215);};}function respondWithFilteredResult(_0x41a555,_0xfd25ec){return function(_0xfcc20b){const _0x5bcc05=a622_0x4879;if(_0xfcc20b){const _0x11e318=_0xfcc20b['count'],_0x155db5=_0xfd25ec[_0x5bcc05('0x2d')];let _0x54059b=_0xfd25ec['offset']+_0xfd25ec['limit'],_0x3e59b2;return _0x54059b>=_0x11e318?(_0x54059b=_0x11e318,_0x3e59b2=0xc8):_0x3e59b2=0xce,_0x41a555[_0x5bcc05('0xe')](_0x3e59b2),_0x41a555[_0x5bcc05('0x1a')](_0x5bcc05('0x9'),_0x155db5+'-'+_0x54059b+'/'+_0x11e318)[_0x5bcc05('0x5')](_0xfcc20b);}return null;};}function saveUpdates(_0x3e3180){return function(_0x1f362c){const _0x1daa64=a622_0x4879;if(_0x1f362c)return _0x1f362c[_0x1daa64('0x30')](_0x3e3180)[_0x1daa64('0x33')](function(_0x360918){return _0x360918;});return null;};}function removeEntity(_0x4c3d65){return function(_0x59eeaf){const _0x131e75=a622_0x4879;if(_0x59eeaf)return _0x59eeaf[_0x131e75('0x39')]()[_0x131e75('0x33')](function(){const _0x4ba8c7=_0x131e75,_0x15c9a7=_0x59eeaf[_0x4ba8c7('0x3a')]({'plain':!![]}),_0x16dd30=_0x4ba8c7('0x18');return db[_0x4ba8c7('0xd')]['destroy']({'where':{'type':_0x16dd30,'resourceId':_0x15c9a7['id']}})[_0x4ba8c7('0x33')](function(){return _0x59eeaf;});})['then'](function(){const _0x35d626=_0x131e75;_0x4c3d65[_0x35d626('0xe')](0xcc)['end']();});};}function handleEntityNotFound(_0x3851a1){return function(_0x1a5233){const _0xed345a=a622_0x4879;return!_0x1a5233&&_0x3851a1[_0xed345a('0x16')](0x194),_0x1a5233;};}function handleError(_0x6891e7,_0x5e66e7){return _0x5e66e7=_0x5e66e7||0x1f4,function(_0x169caa){const _0xcb3036=a622_0x4879;logger['error'](_0x169caa[_0xcb3036('0x20')]),_0x169caa['name']&&delete _0x169caa['name'],_0x6891e7[_0xcb3036('0xe')](_0x5e66e7)['send'](_0x169caa);};}exports[_0x2cbcd7('0xf')]=function(_0xc83394,_0x1d1e84){const _0xef6c07=_0x2cbcd7;let _0x18876d={};const _0x4cc5b7={},_0x51eee0={'count':0x0,'rows':[]},_0x146c55=_['map'](db[_0xef6c07('0x17')]['rawAttributes'],function(_0x1b3afb){const _0x16ad89=_0xef6c07;return{'name':_0x1b3afb[_0x16ad89('0x32')],'type':_0x1b3afb[_0x16ad89('0x21')][_0x16ad89('0x14')]};});_0x4cc5b7[_0xef6c07('0x2')]=_[_0xef6c07('0x25')](_0x146c55,_0xef6c07('0x34')),_0x4cc5b7['query']=_[_0xef6c07('0x2a')](_0xc83394[_0xef6c07('0x36')]),_0x4cc5b7[_0xef6c07('0x10')]=_['intersection'](_0x4cc5b7[_0xef6c07('0x2')],_0x4cc5b7[_0xef6c07('0x36')]),_0x18876d[_0xef6c07('0x15')]=_[_0xef6c07('0x1b')](_0x4cc5b7['model'],qs[_0xef6c07('0x26')](_0xc83394[_0xef6c07('0x36')][_0xef6c07('0x26')])),_0x18876d['attributes']=_0x18876d['attributes']['length']?_0x18876d[_0xef6c07('0x15')]:_0x4cc5b7[_0xef6c07('0x2')];typeof _0xc83394[_0xef6c07('0x36')][_0xef6c07('0x38')]===_0xef6c07('0x35')&&(_0x18876d[_0xef6c07('0x29')]=qs[_0xef6c07('0x29')](_0xc83394['query'][_0xef6c07('0x29')]),_0x18876d[_0xef6c07('0x2d')]=qs['offset'](_0xc83394[_0xef6c07('0x36')]['offset']));_0x18876d[_0xef6c07('0x1e')]=qs[_0xef6c07('0x1d')](_0xc83394[_0xef6c07('0x36')][_0xef6c07('0x1d')]),_0x18876d[_0xef6c07('0x13')]=qs[_0xef6c07('0x10')](_[_0xef6c07('0xa')](_0xc83394['query'],_0x4cc5b7['filters']),_0x146c55);_0xc83394[_0xef6c07('0x36')][_0xef6c07('0x12')]&&(_0x18876d[_0xef6c07('0x13')]=_['merge'](_0x18876d['where'],{[Op['or']]:_[_0xef6c07('0x25')](_0x146c55,function(_0x349e6d){const _0x2a1916=_0xef6c07;if(_0x349e6d[_0x2a1916('0x21')]!==_0x2a1916('0xb')){const _0x186ce0={};return _0x186ce0[_0x349e6d['name']]={[Op['like']]:'%'+_0xc83394['query'][_0x2a1916('0x12')]+'%'},_0x186ce0;}})}));_0x18876d=_[_0xef6c07('0x6')]({},_0x18876d,_0xc83394[_0xef6c07('0x23')]);const _0x2fca25={'where':_0x18876d['where']};return db[_0xef6c07('0x17')][_0xef6c07('0x0')](_0x2fca25)[_0xef6c07('0x33')](function(_0x2dbaf6){const _0x46aba6=_0xef6c07;return _0x51eee0[_0x46aba6('0x0')]=_0x2dbaf6,_0xc83394[_0x46aba6('0x36')][_0x46aba6('0x24')]&&(_0x18876d['include']=[{'all':!![]}]),db['Tag']['findAll'](_0x18876d);})[_0xef6c07('0x33')](function(_0x2f7df9){const _0x2ae9bc=_0xef6c07;return _0x51eee0[_0x2ae9bc('0x22')]=_0x2f7df9,_0x51eee0;})[_0xef6c07('0x33')](respondWithFilteredResult(_0x1d1e84,_0x18876d))[_0xef6c07('0x8')](handleError(_0x1d1e84,null));},exports[_0x2cbcd7('0x1')]=function(_0x37d149,_0x344522){const _0x4a7a90=_0x2cbcd7;let _0x552d5b={'raw':!![],'where':{'id':_0x37d149[_0x4a7a90('0x28')]['id']}};const _0x2594ab={};return _0x2594ab['model']=_[_0x4a7a90('0x2a')](db[_0x4a7a90('0x17')][_0x4a7a90('0x1f')]),_0x2594ab[_0x4a7a90('0x36')]=_['keys'](_0x37d149[_0x4a7a90('0x36')]),_0x2594ab[_0x4a7a90('0x10')]=_['intersection'](_0x2594ab['model'],_0x2594ab[_0x4a7a90('0x36')]),_0x552d5b[_0x4a7a90('0x15')]=_[_0x4a7a90('0x1b')](_0x2594ab[_0x4a7a90('0x2')],qs[_0x4a7a90('0x26')](_0x37d149[_0x4a7a90('0x36')][_0x4a7a90('0x26')])),_0x552d5b[_0x4a7a90('0x15')]=_0x552d5b[_0x4a7a90('0x15')]['length']?_0x552d5b[_0x4a7a90('0x15')]:_0x2594ab[_0x4a7a90('0x2')],_0x37d149[_0x4a7a90('0x36')][_0x4a7a90('0x24')]&&(_0x552d5b['include']=[{'all':!![]}]),_0x552d5b=_[_0x4a7a90('0x6')]({},_0x552d5b,_0x37d149[_0x4a7a90('0x23')]),db[_0x4a7a90('0x17')]['findOne'](_0x552d5b)['then'](handleEntityNotFound(_0x344522,null))[_0x4a7a90('0x33')](respondWithResult(_0x344522,null))[_0x4a7a90('0x8')](handleError(_0x344522,null));},exports['create']=function(_0x4d5100,_0x27df1e){const _0xe221aa=_0x2cbcd7;return db[_0xe221aa('0x17')][_0xe221aa('0x2f')](_0x4d5100['body'],{})[_0xe221aa('0x33')](function(_0x36dc1d){const _0x4b32ee=_0xe221aa,_0x1d6bbe=_0x4d5100[_0x4b32ee('0x11')]['get']({'plain':!![]});if(!_0x1d6bbe)throw new Error(_0x4b32ee('0x4'));if(_0x1d6bbe[_0x4b32ee('0x7')]===_0x4b32ee('0x11')){const _0x1ba71a=_0x36dc1d[_0x4b32ee('0x3a')]({'plain':!![]}),_0x43ef53=_0x4b32ee('0x18');return db[_0x4b32ee('0xc')][_0x4b32ee('0x31')]({'where':{'name':_0x43ef53,'userProfileId':_0x1d6bbe['userProfileId']},'raw':!![]})['then'](function(_0x109ca3){const _0x18ea55=_0x4b32ee;return _0x109ca3&&_0x109ca3[_0x18ea55('0x1c')]===0x0?db[_0x18ea55('0xd')][_0x18ea55('0x2f')]({'name':_0x1ba71a['name'],'resourceId':_0x1ba71a['id'],'type':_0x109ca3['name'],'sectionId':_0x109ca3['id']},{})[_0x18ea55('0x33')](function(){return _0x36dc1d;}):_0x36dc1d;})[_0x4b32ee('0x8')](function(_0x2b534e){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2b534e);throw _0x2b534e;});}return _0x36dc1d;})['then'](respondWithResult(_0x27df1e,0xc9))[_0xe221aa('0x8')](handleError(_0x27df1e,null));},exports[_0x2cbcd7('0x30')]=function(_0x752da8,_0x558d99){const _0x2803c6=_0x2cbcd7;return _0x752da8[_0x2803c6('0x2c')]['id']&&delete _0x752da8['body']['id'],db[_0x2803c6('0x17')][_0x2803c6('0x31')]({'where':{'id':_0x752da8[_0x2803c6('0x28')]['id']}})[_0x2803c6('0x33')](handleEntityNotFound(_0x558d99,null))[_0x2803c6('0x33')](saveUpdates(_0x752da8[_0x2803c6('0x2c')],null))[_0x2803c6('0x33')](respondWithResult(_0x558d99,null))[_0x2803c6('0x8')](handleError(_0x558d99,null));},exports[_0x2cbcd7('0x39')]=function(_0x4e872d,_0x408e4a){const _0xbb2d90=_0x2cbcd7;return db[_0xbb2d90('0x17')][_0xbb2d90('0x31')]({'where':{'id':_0x4e872d['params']['id']}})[_0xbb2d90('0x33')](handleEntityNotFound(_0x408e4a,null))[_0xbb2d90('0x33')](removeEntity(_0x408e4a,null))[_0xbb2d90('0x8')](handleError(_0x408e4a,null));};
\ No newline at end of file