Built motion from commit aab208717af8d15f4fa224cdb6a202877019af9b. Version 3.0.0...
[motion-next.git] / server / api / tag / tag.controller.js
index b622703..4c447ed 100644 (file)
@@ -1 +1 @@
-const a622_0x599b=['offset','VIRTUAL','include','length','limit','role','create','stack','keys','query','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','pick','get','undefined','end','name','intersection','sendStatus','error','status','findAll','lodash','catch','sequelize','merge','rawAttributes','includeAll','model','attributes','index','filters','../../mysqldb','body','sort','user','userProfileId','Tag','findOne','UserProfileSection','map','Unable\x20to\x20retrieve\x20the\x20current\x20user','filter','json','destroy','then','set','count','UserProfileResource','update','../../config/logger','show','options','Tags','fieldName','autoAssociation','where','api','fields','rows','type'];(function(_0x5741b1,_0x599b84){const _0x36d594=function(_0x1c0f4f){while(--_0x1c0f4f){_0x5741b1['push'](_0x5741b1['shift']());}};_0x36d594(++_0x599b84);}(a622_0x599b,0xe1));const a622_0x36d5=function(_0x5741b1,_0x599b84){_0x5741b1=_0x5741b1-0x0;let _0x36d594=a622_0x599b[_0x5741b1];return _0x36d594;};const _0x31c448=a622_0x36d5;'use strict';const _=require(_0x31c448('0x29')),qs=require('../../components/parsers/qs'),logger=require(_0x31c448('0x8'))(_0x31c448('0xf')),db=require(_0x31c448('0x33'))['db'],{Op}=require(_0x31c448('0x2b'));function respondWithResult(_0x1c0f4f,_0x4e7449){return _0x4e7449=_0x4e7449||0xc8,function(_0x159b58){const _0xa17b3f=a622_0x36d5;if(_0x159b58)return _0x1c0f4f[_0xa17b3f('0x27')](_0x4e7449)[_0xa17b3f('0x1')](_0x159b58);};}function respondWithFilteredResult(_0x56ca0d,_0x16a063){return function(_0x44f214){const _0xa8a3f5=a622_0x36d5;if(_0x44f214){const _0x3d85df=_0x44f214['count'],_0x244c7c=_0x16a063['offset'];let _0x33a356=_0x16a063[_0xa8a3f5('0x13')]+_0x16a063[_0xa8a3f5('0x17')],_0x31f232;return _0x33a356>=_0x3d85df?(_0x33a356=_0x3d85df,_0x31f232=0xc8):_0x31f232=0xce,_0x56ca0d[_0xa8a3f5('0x27')](_0x31f232),_0x56ca0d[_0xa8a3f5('0x4')]('Content-Range',_0x244c7c+'-'+_0x33a356+'/'+_0x3d85df)[_0xa8a3f5('0x1')](_0x44f214);}return null;};}function saveUpdates(_0x5ba94e){return function(_0x2b3eb7){const _0x2f596d=a622_0x36d5;if(_0x2b3eb7)return _0x2b3eb7[_0x2f596d('0x7')](_0x5ba94e)[_0x2f596d('0x3')](function(_0x21eb42){return _0x21eb42;});return null;};}function removeEntity(_0x122186){return function(_0x32e93d){const _0x781e63=a622_0x36d5;if(_0x32e93d)return _0x32e93d['destroy']()[_0x781e63('0x3')](function(){const _0x273ad9=_0x781e63,_0x19c82c=_0x32e93d[_0x273ad9('0x20')]({'plain':!![]}),_0x2015de=_0x273ad9('0xb');return db['UserProfileResource'][_0x273ad9('0x2')]({'where':{'type':_0x2015de,'resourceId':_0x19c82c['id']}})['then'](function(){return _0x32e93d;});})['then'](function(){const _0x4d3007=_0x781e63;_0x122186[_0x4d3007('0x27')](0xcc)[_0x4d3007('0x22')]();});};}function handleEntityNotFound(_0x5b72f5){return function(_0x565112){const _0x561eea=a622_0x36d5;return!_0x565112&&_0x5b72f5[_0x561eea('0x25')](0x194),_0x565112;};}function handleError(_0x55ecfc,_0x57df9f){return _0x57df9f=_0x57df9f||0x1f4,function(_0xcbfab0){const _0x3c640c=a622_0x36d5;logger[_0x3c640c('0x26')](_0xcbfab0[_0x3c640c('0x1a')]),_0xcbfab0[_0x3c640c('0x23')]&&delete _0xcbfab0[_0x3c640c('0x23')],_0x55ecfc['status'](_0x57df9f)['send'](_0xcbfab0);};}exports[_0x31c448('0x31')]=function(_0x4fb3d0,_0x51e671){const _0x211495=_0x31c448;let _0x23b500={};const _0x3ab21c={},_0x3ed418={'count':0x0,'rows':[]},_0x568bc4=_[_0x211495('0x3b')](db[_0x211495('0x38')][_0x211495('0x2d')],function(_0x295c08){const _0x1bd2b3=_0x211495;return{'name':_0x295c08[_0x1bd2b3('0xc')],'type':_0x295c08['type']['key']};});_0x3ab21c[_0x211495('0x2f')]=_[_0x211495('0x3b')](_0x568bc4,_0x211495('0x23')),_0x3ab21c['query']=_[_0x211495('0x1b')](_0x4fb3d0['query']),_0x3ab21c[_0x211495('0x32')]=_[_0x211495('0x24')](_0x3ab21c['model'],_0x3ab21c['query']),_0x23b500[_0x211495('0x30')]=_[_0x211495('0x24')](_0x3ab21c[_0x211495('0x2f')],qs['fields'](_0x4fb3d0[_0x211495('0x1c')][_0x211495('0x10')])),_0x23b500[_0x211495('0x30')]=_0x23b500[_0x211495('0x30')][_0x211495('0x16')]?_0x23b500[_0x211495('0x30')]:_0x3ab21c['model'];typeof _0x4fb3d0['query']['nolimit']===_0x211495('0x21')&&(_0x23b500[_0x211495('0x17')]=qs[_0x211495('0x17')](_0x4fb3d0[_0x211495('0x1c')][_0x211495('0x17')]),_0x23b500[_0x211495('0x13')]=qs['offset'](_0x4fb3d0[_0x211495('0x1c')][_0x211495('0x13')]));_0x23b500['order']=qs[_0x211495('0x35')](_0x4fb3d0[_0x211495('0x1c')]['sort']),_0x23b500['where']=qs['filters'](_[_0x211495('0x1f')](_0x4fb3d0[_0x211495('0x1c')],_0x3ab21c[_0x211495('0x32')]),_0x568bc4);_0x4fb3d0[_0x211495('0x1c')]['filter']&&(_0x23b500['where']=_['merge'](_0x23b500[_0x211495('0xe')],{[Op['or']]:_[_0x211495('0x3b')](_0x568bc4,function(_0x2a4397){const _0x194ff9=_0x211495;if(_0x2a4397[_0x194ff9('0x12')]!==_0x194ff9('0x14')){const _0x42354d={};return _0x42354d[_0x2a4397[_0x194ff9('0x23')]]={[Op['like']]:'%'+_0x4fb3d0['query'][_0x194ff9('0x0')]+'%'},_0x42354d;}})}));_0x23b500=_[_0x211495('0x2c')]({},_0x23b500,_0x4fb3d0[_0x211495('0xa')]);const _0x122467={'where':_0x23b500[_0x211495('0xe')]};return db['Tag']['count'](_0x122467)[_0x211495('0x3')](function(_0x23979f){const _0x1e090c=_0x211495;return _0x3ed418[_0x1e090c('0x5')]=_0x23979f,_0x4fb3d0[_0x1e090c('0x1c')][_0x1e090c('0x2e')]&&(_0x23b500[_0x1e090c('0x15')]=[{'all':!![]}]),db[_0x1e090c('0x38')][_0x1e090c('0x28')](_0x23b500);})[_0x211495('0x3')](function(_0x12cf39){const _0x37c385=_0x211495;return _0x3ed418[_0x37c385('0x11')]=_0x12cf39,_0x3ed418;})[_0x211495('0x3')](respondWithFilteredResult(_0x51e671,_0x23b500))[_0x211495('0x2a')](handleError(_0x51e671,null));},exports[_0x31c448('0x9')]=function(_0x440a7a,_0x432aa1){const _0xde62ec=_0x31c448;let _0x5b3072={'raw':!![],'where':{'id':_0x440a7a[_0xde62ec('0x1e')]['id']}};const _0x4f36cc={};return _0x4f36cc[_0xde62ec('0x2f')]=_['keys'](db[_0xde62ec('0x38')][_0xde62ec('0x2d')]),_0x4f36cc['query']=_[_0xde62ec('0x1b')](_0x440a7a[_0xde62ec('0x1c')]),_0x4f36cc[_0xde62ec('0x32')]=_[_0xde62ec('0x24')](_0x4f36cc[_0xde62ec('0x2f')],_0x4f36cc['query']),_0x5b3072[_0xde62ec('0x30')]=_['intersection'](_0x4f36cc[_0xde62ec('0x2f')],qs[_0xde62ec('0x10')](_0x440a7a['query'][_0xde62ec('0x10')])),_0x5b3072[_0xde62ec('0x30')]=_0x5b3072[_0xde62ec('0x30')][_0xde62ec('0x16')]?_0x5b3072['attributes']:_0x4f36cc['model'],_0x440a7a[_0xde62ec('0x1c')][_0xde62ec('0x2e')]&&(_0x5b3072[_0xde62ec('0x15')]=[{'all':!![]}]),_0x5b3072=_[_0xde62ec('0x2c')]({},_0x5b3072,_0x440a7a[_0xde62ec('0xa')]),db['Tag'][_0xde62ec('0x39')](_0x5b3072)[_0xde62ec('0x3')](handleEntityNotFound(_0x432aa1,null))['then'](respondWithResult(_0x432aa1,null))[_0xde62ec('0x2a')](handleError(_0x432aa1,null));},exports[_0x31c448('0x19')]=function(_0x3f3e3f,_0x1141e1){const _0x5290c9=_0x31c448;return db[_0x5290c9('0x38')]['create'](_0x3f3e3f[_0x5290c9('0x34')],{})['then'](function(_0x1b747c){const _0x583886=_0x5290c9,_0x582d4b=_0x3f3e3f[_0x583886('0x36')][_0x583886('0x20')]({'plain':!![]});if(!_0x582d4b)throw new Error(_0x583886('0x3c'));if(_0x582d4b[_0x583886('0x18')]==='user'){const _0x5393e5=_0x1b747c[_0x583886('0x20')]({'plain':!![]}),_0x3d29ea='Tags';return db[_0x583886('0x3a')][_0x583886('0x39')]({'where':{'name':_0x3d29ea,'userProfileId':_0x582d4b[_0x583886('0x37')]},'raw':!![]})['then'](function(_0x379861){const _0x30d7cd=_0x583886;return _0x379861&&_0x379861[_0x30d7cd('0xd')]===0x0?db[_0x30d7cd('0x6')][_0x30d7cd('0x19')]({'name':_0x5393e5[_0x30d7cd('0x23')],'resourceId':_0x5393e5['id'],'type':_0x379861[_0x30d7cd('0x23')],'sectionId':_0x379861['id']},{})[_0x30d7cd('0x3')](function(){return _0x1b747c;}):_0x1b747c;})['catch'](function(_0x509080){const _0x2c7bc9=_0x583886;logger[_0x2c7bc9('0x26')](_0x2c7bc9('0x1d'),_0x509080);throw _0x509080;});}return _0x1b747c;})[_0x5290c9('0x3')](respondWithResult(_0x1141e1,0xc9))[_0x5290c9('0x2a')](handleError(_0x1141e1,null));},exports[_0x31c448('0x7')]=function(_0x25573e,_0x2d70c7){const _0x402e84=_0x31c448;return _0x25573e[_0x402e84('0x34')]['id']&&delete _0x25573e['body']['id'],db[_0x402e84('0x38')][_0x402e84('0x39')]({'where':{'id':_0x25573e['params']['id']}})['then'](handleEntityNotFound(_0x2d70c7,null))[_0x402e84('0x3')](saveUpdates(_0x25573e[_0x402e84('0x34')],null))[_0x402e84('0x3')](respondWithResult(_0x2d70c7,null))[_0x402e84('0x2a')](handleError(_0x2d70c7,null));},exports['destroy']=function(_0x1bb7c0,_0x5d9d37){const _0x2a2bbd=_0x31c448;return db[_0x2a2bbd('0x38')][_0x2a2bbd('0x39')]({'where':{'id':_0x1bb7c0[_0x2a2bbd('0x1e')]['id']}})['then'](handleEntityNotFound(_0x5d9d37,null))[_0x2a2bbd('0x3')](removeEntity(_0x5d9d37,null))[_0x2a2bbd('0x2a')](handleError(_0x5d9d37,null));};
\ No newline at end of file
+const a622_0x15d9=['Content-Range','lodash','stack','fieldName','Tags','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','then','UserProfileSection','query','params','index','body','get','order','sendStatus','rawAttributes','rows','limit','name','json','../../mysqldb','UserProfileResource','merge','role','update','filter','keys','error','autoAssociation','count','pick','findAll','VIRTUAL','offset','include','Tag','catch','attributes','destroy','nolimit','Unable\x20to\x20retrieve\x20the\x20current\x20user','../../components/parsers/qs','api','type','map','send','options','sequelize','where','fields','status','end','sort','intersection','like','findOne','filters','includeAll','model','create','user','undefined'];(function(_0x1bf503,_0x15d9ff){const _0x344a3b=function(_0x2bda51){while(--_0x2bda51){_0x1bf503['push'](_0x1bf503['shift']());}};_0x344a3b(++_0x15d9ff);}(a622_0x15d9,0xe6));const a622_0x344a=function(_0x1bf503,_0x15d9ff){_0x1bf503=_0x1bf503-0x0;let _0x344a3b=a622_0x15d9[_0x1bf503];return _0x344a3b;};const _0x2c0baf=a622_0x344a;'use strict';const _=require(_0x2c0baf('0x13')),qs=require(_0x2c0baf('0x3b')),logger=require('../../config/logger')(_0x2c0baf('0x3c')),db=require(_0x2c0baf('0x26'))['db'],{Op}=require(_0x2c0baf('0x3'));function respondWithResult(_0x2bda51,_0x50ff6f){return _0x50ff6f=_0x50ff6f||0xc8,function(_0x2d42a9){const _0x3265a1=a622_0x344a;if(_0x2d42a9)return _0x2bda51[_0x3265a1('0x6')](_0x50ff6f)[_0x3265a1('0x25')](_0x2d42a9);};}function respondWithFilteredResult(_0x2fdcd7,_0x42aef0){return function(_0xe0ac20){const _0x40205b=a622_0x344a;if(_0xe0ac20){const _0x2ea225=_0xe0ac20[_0x40205b('0x2f')],_0x14aff4=_0x42aef0[_0x40205b('0x33')];let _0x4f146c=_0x42aef0['offset']+_0x42aef0[_0x40205b('0x23')],_0x1b0db2;return _0x4f146c>=_0x2ea225?(_0x4f146c=_0x2ea225,_0x1b0db2=0xc8):_0x1b0db2=0xce,_0x2fdcd7[_0x40205b('0x6')](_0x1b0db2),_0x2fdcd7['set'](_0x40205b('0x12'),_0x14aff4+'-'+_0x4f146c+'/'+_0x2ea225)['json'](_0xe0ac20);}return null;};}function saveUpdates(_0xfe1c66){return function(_0xd84058){const _0x5c845d=a622_0x344a;if(_0xd84058)return _0xd84058[_0x5c845d('0x2a')](_0xfe1c66)[_0x5c845d('0x18')](function(_0x2edacb){return _0x2edacb;});return null;};}function removeEntity(_0x4fa922){return function(_0x351d8b){const _0x4a8a14=a622_0x344a;if(_0x351d8b)return _0x351d8b['destroy']()[_0x4a8a14('0x18')](function(){const _0x1d3925=_0x4a8a14,_0xfd1ec7=_0x351d8b[_0x1d3925('0x1e')]({'plain':!![]}),_0x4373c8=_0x1d3925('0x16');return db[_0x1d3925('0x27')][_0x1d3925('0x38')]({'where':{'type':_0x4373c8,'resourceId':_0xfd1ec7['id']}})[_0x1d3925('0x18')](function(){return _0x351d8b;});})[_0x4a8a14('0x18')](function(){const _0x90e395=_0x4a8a14;_0x4fa922[_0x90e395('0x6')](0xcc)[_0x90e395('0x7')]();});};}function handleEntityNotFound(_0x4f8162){return function(_0x36f2f2){const _0x4203a9=a622_0x344a;return!_0x36f2f2&&_0x4f8162[_0x4203a9('0x20')](0x194),_0x36f2f2;};}function handleError(_0xba0f11,_0x2772d8){return _0x2772d8=_0x2772d8||0x1f4,function(_0x402093){const _0x4ec1c1=a622_0x344a;logger[_0x4ec1c1('0x2d')](_0x402093[_0x4ec1c1('0x14')]),_0x402093[_0x4ec1c1('0x24')]&&delete _0x402093[_0x4ec1c1('0x24')],_0xba0f11[_0x4ec1c1('0x6')](_0x2772d8)[_0x4ec1c1('0x1')](_0x402093);};}exports[_0x2c0baf('0x1c')]=function(_0x6eb0b2,_0x5f486f){const _0x13f1fa=_0x2c0baf;let _0x1e9467={};const _0x4fd0a2={},_0x74d3c2={'count':0x0,'rows':[]},_0x59fc8e=_[_0x13f1fa('0x0')](db[_0x13f1fa('0x35')][_0x13f1fa('0x21')],function(_0x70dc12){const _0x1d22f0=_0x13f1fa;return{'name':_0x70dc12[_0x1d22f0('0x15')],'type':_0x70dc12[_0x1d22f0('0x3d')]['key']};});_0x4fd0a2[_0x13f1fa('0xe')]=_[_0x13f1fa('0x0')](_0x59fc8e,_0x13f1fa('0x24')),_0x4fd0a2['query']=_[_0x13f1fa('0x2c')](_0x6eb0b2[_0x13f1fa('0x1a')]),_0x4fd0a2[_0x13f1fa('0xc')]=_[_0x13f1fa('0x9')](_0x4fd0a2['model'],_0x4fd0a2[_0x13f1fa('0x1a')]),_0x1e9467['attributes']=_[_0x13f1fa('0x9')](_0x4fd0a2[_0x13f1fa('0xe')],qs[_0x13f1fa('0x5')](_0x6eb0b2['query'][_0x13f1fa('0x5')])),_0x1e9467[_0x13f1fa('0x37')]=_0x1e9467[_0x13f1fa('0x37')]['length']?_0x1e9467[_0x13f1fa('0x37')]:_0x4fd0a2['model'];typeof _0x6eb0b2['query'][_0x13f1fa('0x39')]===_0x13f1fa('0x11')&&(_0x1e9467[_0x13f1fa('0x23')]=qs[_0x13f1fa('0x23')](_0x6eb0b2[_0x13f1fa('0x1a')][_0x13f1fa('0x23')]),_0x1e9467[_0x13f1fa('0x33')]=qs[_0x13f1fa('0x33')](_0x6eb0b2[_0x13f1fa('0x1a')][_0x13f1fa('0x33')]));_0x1e9467[_0x13f1fa('0x1f')]=qs[_0x13f1fa('0x8')](_0x6eb0b2['query'][_0x13f1fa('0x8')]),_0x1e9467['where']=qs[_0x13f1fa('0xc')](_[_0x13f1fa('0x30')](_0x6eb0b2['query'],_0x4fd0a2[_0x13f1fa('0xc')]),_0x59fc8e);_0x6eb0b2[_0x13f1fa('0x1a')][_0x13f1fa('0x2b')]&&(_0x1e9467[_0x13f1fa('0x4')]=_[_0x13f1fa('0x28')](_0x1e9467[_0x13f1fa('0x4')],{[Op['or']]:_[_0x13f1fa('0x0')](_0x59fc8e,function(_0x4334ef){const _0x5d3351=_0x13f1fa;if(_0x4334ef[_0x5d3351('0x3d')]!==_0x5d3351('0x32')){const _0xfa7b1e={};return _0xfa7b1e[_0x4334ef[_0x5d3351('0x24')]]={[Op[_0x5d3351('0xa')]]:'%'+_0x6eb0b2[_0x5d3351('0x1a')][_0x5d3351('0x2b')]+'%'},_0xfa7b1e;}})}));_0x1e9467=_[_0x13f1fa('0x28')]({},_0x1e9467,_0x6eb0b2['options']);const _0x25aa5d={'where':_0x1e9467['where']};return db['Tag'][_0x13f1fa('0x2f')](_0x25aa5d)['then'](function(_0x4f476c){const _0x4e55ec=_0x13f1fa;return _0x74d3c2[_0x4e55ec('0x2f')]=_0x4f476c,_0x6eb0b2[_0x4e55ec('0x1a')][_0x4e55ec('0xd')]&&(_0x1e9467[_0x4e55ec('0x34')]=[{'all':!![]}]),db['Tag'][_0x4e55ec('0x31')](_0x1e9467);})[_0x13f1fa('0x18')](function(_0x480397){const _0x36415f=_0x13f1fa;return _0x74d3c2[_0x36415f('0x22')]=_0x480397,_0x74d3c2;})['then'](respondWithFilteredResult(_0x5f486f,_0x1e9467))[_0x13f1fa('0x36')](handleError(_0x5f486f,null));},exports['show']=function(_0x39153f,_0x49ac9b){const _0x3151b7=_0x2c0baf;let _0x4169c0={'raw':!![],'where':{'id':_0x39153f['params']['id']}};const _0x49100a={};return _0x49100a[_0x3151b7('0xe')]=_[_0x3151b7('0x2c')](db['Tag'][_0x3151b7('0x21')]),_0x49100a[_0x3151b7('0x1a')]=_[_0x3151b7('0x2c')](_0x39153f[_0x3151b7('0x1a')]),_0x49100a[_0x3151b7('0xc')]=_[_0x3151b7('0x9')](_0x49100a[_0x3151b7('0xe')],_0x49100a[_0x3151b7('0x1a')]),_0x4169c0['attributes']=_['intersection'](_0x49100a[_0x3151b7('0xe')],qs[_0x3151b7('0x5')](_0x39153f[_0x3151b7('0x1a')]['fields'])),_0x4169c0[_0x3151b7('0x37')]=_0x4169c0[_0x3151b7('0x37')]['length']?_0x4169c0['attributes']:_0x49100a['model'],_0x39153f[_0x3151b7('0x1a')][_0x3151b7('0xd')]&&(_0x4169c0[_0x3151b7('0x34')]=[{'all':!![]}]),_0x4169c0=_['merge']({},_0x4169c0,_0x39153f[_0x3151b7('0x2')]),db['Tag']['findOne'](_0x4169c0)[_0x3151b7('0x18')](handleEntityNotFound(_0x49ac9b,null))['then'](respondWithResult(_0x49ac9b,null))[_0x3151b7('0x36')](handleError(_0x49ac9b,null));},exports['create']=function(_0x35b9f7,_0x5e4eaf){const _0x7c372f=_0x2c0baf;return db[_0x7c372f('0x35')][_0x7c372f('0xf')](_0x35b9f7[_0x7c372f('0x1d')],{})[_0x7c372f('0x18')](function(_0x12838a){const _0x3bedeb=_0x7c372f,_0x545a79=_0x35b9f7['user'][_0x3bedeb('0x1e')]({'plain':!![]});if(!_0x545a79)throw new Error(_0x3bedeb('0x3a'));if(_0x545a79[_0x3bedeb('0x29')]===_0x3bedeb('0x10')){const _0x1e80c0=_0x12838a[_0x3bedeb('0x1e')]({'plain':!![]}),_0xc98e1e=_0x3bedeb('0x16');return db[_0x3bedeb('0x19')][_0x3bedeb('0xb')]({'where':{'name':_0xc98e1e,'userProfileId':_0x545a79['userProfileId']},'raw':!![]})[_0x3bedeb('0x18')](function(_0x3e6316){const _0x49186f=_0x3bedeb;return _0x3e6316&&_0x3e6316[_0x49186f('0x2e')]===0x0?db['UserProfileResource'][_0x49186f('0xf')]({'name':_0x1e80c0['name'],'resourceId':_0x1e80c0['id'],'type':_0x3e6316[_0x49186f('0x24')],'sectionId':_0x3e6316['id']},{})[_0x49186f('0x18')](function(){return _0x12838a;}):_0x12838a;})[_0x3bedeb('0x36')](function(_0x155692){const _0x16762a=_0x3bedeb;logger['error'](_0x16762a('0x17'),_0x155692);throw _0x155692;});}return _0x12838a;})[_0x7c372f('0x18')](respondWithResult(_0x5e4eaf,0xc9))[_0x7c372f('0x36')](handleError(_0x5e4eaf,null));},exports[_0x2c0baf('0x2a')]=function(_0x369415,_0x33ded3){const _0x3123fe=_0x2c0baf;return _0x369415[_0x3123fe('0x1d')]['id']&&delete _0x369415[_0x3123fe('0x1d')]['id'],db['Tag'][_0x3123fe('0xb')]({'where':{'id':_0x369415[_0x3123fe('0x1b')]['id']}})[_0x3123fe('0x18')](handleEntityNotFound(_0x33ded3,null))[_0x3123fe('0x18')](saveUpdates(_0x369415[_0x3123fe('0x1d')],null))[_0x3123fe('0x18')](respondWithResult(_0x33ded3,null))[_0x3123fe('0x36')](handleError(_0x33ded3,null));},exports[_0x2c0baf('0x38')]=function(_0x383c26,_0x54251c){const _0x38f7c4=_0x2c0baf;return db[_0x38f7c4('0x35')][_0x38f7c4('0xb')]({'where':{'id':_0x383c26['params']['id']}})[_0x38f7c4('0x18')](handleEntityNotFound(_0x54251c,null))[_0x38f7c4('0x18')](removeEntity(_0x54251c,null))['catch'](handleError(_0x54251c,null));};
\ No newline at end of file