Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / api / voiceChanSpy / voiceChanSpy.controller.js
index b7a2b6e..46d9e86 100644 (file)
@@ -1 +1 @@
-const a856_0x2908=['../../mysqldb','name','userProfileId','../../config/logger','rows','autoAssociation','type','user','lodash','Unable\x20to\x20retrieve\x20the\x20current\x20user','destroy','findAll','error','Content-Range','VoiceChanSpy','catch','sequelize','attributes','json','fieldName','length','params','like','filter','rawAttributes','ChanSpies','set','sort','pick','order','show','VIRTUAL','key','count','intersection','map','create','include','keys','sendStatus','UserProfileResource','merge','includeAll','filters','status','then','get','limit','findOne','send','model','api','query','options','stack','offset','where','fields','update','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','index','body'];(function(_0x1b0dd7,_0x55f010){const _0x290882=function(_0x128c60){while(--_0x128c60){_0x1b0dd7['push'](_0x1b0dd7['shift']());}};_0x290882(++_0x55f010);}(a856_0x2908,0x7b));const a856_0x128c=function(_0x1b0dd7,_0x55f010){_0x1b0dd7=_0x1b0dd7-0x124;let _0x290882=a856_0x2908[_0x1b0dd7];return _0x290882;};const a856_0x41e069=a856_0x128c;'use strict';const _=require(a856_0x41e069(0x12d)),qs=require('../../components/parsers/qs'),logger=require(a856_0x41e069(0x128))(a856_0x41e069(0x158)),{db}=require(a856_0x41e069(0x125)),{Op}=require(a856_0x41e069(0x135));function respondWithResult(_0x3a4157,_0x534517){return _0x534517=_0x534517||0xc8,function(_0x20edcd){const _0x3fc1d6=a856_0x128c;if(_0x20edcd)return _0x3a4157[_0x3fc1d6(0x151)](_0x534517)[_0x3fc1d6(0x137)](_0x20edcd);};}function respondWithFilteredResult(_0x4a9b3c,_0x4e460b){return function(_0x578a01){const _0x52208d=a856_0x128c;if(_0x578a01){const _0x545b57=_0x578a01[_0x52208d(0x146)],_0x36b0aa=_0x4e460b[_0x52208d(0x15c)];let _0x56c4b2=_0x4e460b[_0x52208d(0x15c)]+_0x4e460b['limit'],_0x7fc4b;return _0x56c4b2>=_0x545b57?(_0x56c4b2=_0x545b57,_0x7fc4b=0xc8):_0x7fc4b=0xce,_0x4a9b3c[_0x52208d(0x151)](_0x7fc4b),_0x4a9b3c[_0x52208d(0x13f)](_0x52208d(0x132),_0x36b0aa+'-'+_0x56c4b2+'/'+_0x545b57)[_0x52208d(0x137)](_0x578a01);}return null;};}function saveUpdates(_0x5b1640){return function(_0x35ef6b){const _0x513f1d=a856_0x128c;if(_0x35ef6b)return _0x35ef6b[_0x513f1d(0x15f)](_0x5b1640)[_0x513f1d(0x152)](function(_0x34ecd8){return _0x34ecd8;});return null;};}function removeEntity(_0x49848c){return function(_0x527835){const _0x4d8ab1=a856_0x128c;if(_0x527835)return _0x527835[_0x4d8ab1(0x12f)]()['then'](function(){const _0x32d924=_0x4d8ab1,_0x25f958=_0x527835[_0x32d924(0x153)]({'plain':!![]}),_0x4b2390=_0x32d924(0x13e);return db[_0x32d924(0x14d)][_0x32d924(0x12f)]({'where':{'type':_0x4b2390,'resourceId':_0x25f958['id']}})[_0x32d924(0x152)](function(){return _0x527835;});})[_0x4d8ab1(0x152)](function(){const _0xe0e33c=_0x4d8ab1;_0x49848c[_0xe0e33c(0x151)](0xcc)['end']();});};}function handleEntityNotFound(_0x16e5af){return function(_0x161a04){const _0x39d5f1=a856_0x128c;return!_0x161a04&&_0x16e5af[_0x39d5f1(0x14c)](0x194),_0x161a04;};}function handleError(_0x56116c,_0x41742d){return _0x41742d=_0x41742d||0x1f4,function(_0x5be71d){const _0x191dd6=a856_0x128c;logger[_0x191dd6(0x131)](_0x5be71d[_0x191dd6(0x15b)]),_0x5be71d[_0x191dd6(0x126)]&&delete _0x5be71d[_0x191dd6(0x126)],_0x56116c[_0x191dd6(0x151)](_0x41742d)[_0x191dd6(0x156)](_0x5be71d);};}exports[a856_0x41e069(0x161)]=function(_0xa6bc5c,_0x425156){const _0x5b092e=a856_0x41e069;let _0x3922a6={};const _0xc84b26={},_0x53aa64={'count':0x0,'rows':[]},_0x1a9288=_[_0x5b092e(0x148)](db[_0x5b092e(0x133)][_0x5b092e(0x13d)],function(_0xbb8d07){const _0x1fe91b=_0x5b092e;return{'name':_0xbb8d07[_0x1fe91b(0x138)],'type':_0xbb8d07[_0x1fe91b(0x12b)][_0x1fe91b(0x145)]};});_0xc84b26['model']=_[_0x5b092e(0x148)](_0x1a9288,'name'),_0xc84b26[_0x5b092e(0x159)]=_['keys'](_0xa6bc5c[_0x5b092e(0x159)]),_0xc84b26[_0x5b092e(0x150)]=_[_0x5b092e(0x147)](_0xc84b26[_0x5b092e(0x157)],_0xc84b26[_0x5b092e(0x159)]),_0x3922a6[_0x5b092e(0x136)]=_[_0x5b092e(0x147)](_0xc84b26[_0x5b092e(0x157)],qs[_0x5b092e(0x15e)](_0xa6bc5c[_0x5b092e(0x159)][_0x5b092e(0x15e)])),_0x3922a6['attributes']=_0x3922a6[_0x5b092e(0x136)][_0x5b092e(0x139)]?_0x3922a6['attributes']:_0xc84b26['model'];typeof _0xa6bc5c[_0x5b092e(0x159)]['nolimit']==='undefined'&&(_0x3922a6[_0x5b092e(0x154)]=qs[_0x5b092e(0x154)](_0xa6bc5c['query']['limit']),_0x3922a6[_0x5b092e(0x15c)]=qs[_0x5b092e(0x15c)](_0xa6bc5c[_0x5b092e(0x159)][_0x5b092e(0x15c)]));_0x3922a6[_0x5b092e(0x142)]=qs[_0x5b092e(0x140)](_0xa6bc5c[_0x5b092e(0x159)]['sort']),_0x3922a6[_0x5b092e(0x15d)]=qs[_0x5b092e(0x150)](_[_0x5b092e(0x141)](_0xa6bc5c[_0x5b092e(0x159)],_0xc84b26['filters']),_0x1a9288);_0xa6bc5c[_0x5b092e(0x159)]['filter']&&(_0x3922a6[_0x5b092e(0x15d)]=_['merge'](_0x3922a6[_0x5b092e(0x15d)],{[Op['or']]:_['map'](_0x1a9288,function(_0x199bc0){const _0x4e1885=_0x5b092e;if(_0x199bc0[_0x4e1885(0x12b)]!==_0x4e1885(0x144)){const _0xa437e6={};return _0xa437e6[_0x199bc0[_0x4e1885(0x126)]]={[Op[_0x4e1885(0x13b)]]:'%'+_0xa6bc5c[_0x4e1885(0x159)][_0x4e1885(0x13c)]+'%'},_0xa437e6;}})}));_0x3922a6=_[_0x5b092e(0x14e)]({},_0x3922a6,_0xa6bc5c[_0x5b092e(0x15a)]);const _0x1c665c={'where':_0x3922a6['where']};return db[_0x5b092e(0x133)]['count'](_0x1c665c)['then'](function(_0x4d4804){const _0x4e327f=_0x5b092e;return _0x53aa64[_0x4e327f(0x146)]=_0x4d4804,_0xa6bc5c['query']['includeAll']&&(_0x3922a6[_0x4e327f(0x14a)]=[{'all':!![]}]),db[_0x4e327f(0x133)][_0x4e327f(0x130)](_0x3922a6);})[_0x5b092e(0x152)](function(_0xa874bf){const _0x46862f=_0x5b092e;return _0x53aa64[_0x46862f(0x129)]=_0xa874bf,_0x53aa64;})['then'](respondWithFilteredResult(_0x425156,_0x3922a6))['catch'](handleError(_0x425156,null));},exports[a856_0x41e069(0x143)]=function(_0x3aa3f4,_0x558dc2){const _0x158820=a856_0x41e069;let _0x52d756={'raw':![],'where':{'id':_0x3aa3f4[_0x158820(0x13a)]['id']}};const _0x2b2cb7={};return _0x2b2cb7['model']=_[_0x158820(0x14b)](db[_0x158820(0x133)][_0x158820(0x13d)]),_0x2b2cb7['query']=_[_0x158820(0x14b)](_0x3aa3f4[_0x158820(0x159)]),_0x2b2cb7['filters']=_[_0x158820(0x147)](_0x2b2cb7[_0x158820(0x157)],_0x2b2cb7[_0x158820(0x159)]),_0x52d756[_0x158820(0x136)]=_[_0x158820(0x147)](_0x2b2cb7[_0x158820(0x157)],qs['fields'](_0x3aa3f4[_0x158820(0x159)][_0x158820(0x15e)])),_0x52d756[_0x158820(0x136)]=_0x52d756[_0x158820(0x136)][_0x158820(0x139)]?_0x52d756[_0x158820(0x136)]:_0x2b2cb7[_0x158820(0x157)],_0x3aa3f4['query'][_0x158820(0x14f)]&&(_0x52d756[_0x158820(0x14a)]=[{'all':!![]}]),_0x52d756=_[_0x158820(0x14e)]({},_0x52d756,_0x3aa3f4[_0x158820(0x15a)]),db['VoiceChanSpy'][_0x158820(0x155)](_0x52d756)[_0x158820(0x152)](handleEntityNotFound(_0x558dc2,null))[_0x158820(0x152)](respondWithResult(_0x558dc2,null))[_0x158820(0x134)](handleError(_0x558dc2,null));},exports['create']=function(_0x5b53ba,_0x37eb7f){const _0x19b8c5=a856_0x41e069;return db[_0x19b8c5(0x133)][_0x19b8c5(0x149)](_0x5b53ba[_0x19b8c5(0x124)],{})[_0x19b8c5(0x152)](function(_0xe7dcd4){const _0x1f9030=_0x19b8c5,_0x14e6b6=_0x5b53ba[_0x1f9030(0x12c)]['get']({'plain':!![]});if(!_0x14e6b6)throw new Error(_0x1f9030(0x12e));if(_0x14e6b6['role']===_0x1f9030(0x12c)){const _0x3c46af=_0xe7dcd4['get']({'plain':!![]}),_0x16b048=_0x1f9030(0x13e);return db['UserProfileSection'][_0x1f9030(0x155)]({'where':{'name':_0x16b048,'userProfileId':_0x14e6b6[_0x1f9030(0x127)]},'raw':!![]})['then'](function(_0x5b8637){const _0x2d8933=_0x1f9030;return _0x5b8637&&_0x5b8637[_0x2d8933(0x12a)]===0x0?db[_0x2d8933(0x14d)][_0x2d8933(0x149)]({'name':_0x3c46af[_0x2d8933(0x126)],'resourceId':_0x3c46af['id'],'type':_0x5b8637[_0x2d8933(0x126)],'sectionId':_0x5b8637['id']},{})[_0x2d8933(0x152)](function(){return _0xe7dcd4;}):_0xe7dcd4;})[_0x1f9030(0x134)](function(_0x549fa6){const _0x164e71=_0x1f9030;logger[_0x164e71(0x131)](_0x164e71(0x160),_0x549fa6);throw _0x549fa6;});}return _0xe7dcd4;})['then'](respondWithResult(_0x37eb7f,0xc9))[_0x19b8c5(0x134)](handleError(_0x37eb7f,null));},exports[a856_0x41e069(0x15f)]=function(_0x5d7db0,_0x5990ee){const _0x59fbc8=a856_0x41e069;return _0x5d7db0[_0x59fbc8(0x124)]['id']&&delete _0x5d7db0['body']['id'],db['VoiceChanSpy'][_0x59fbc8(0x155)]({'where':{'id':_0x5d7db0[_0x59fbc8(0x13a)]['id']}})['then'](handleEntityNotFound(_0x5990ee,null))[_0x59fbc8(0x152)](saveUpdates(_0x5d7db0[_0x59fbc8(0x124)],null))[_0x59fbc8(0x152)](respondWithResult(_0x5990ee,null))[_0x59fbc8(0x134)](handleError(_0x5990ee,null));},exports[a856_0x41e069(0x12f)]=function(_0x5c5e70,_0x1ea7da){const _0x2d92f3=a856_0x41e069;return db['VoiceChanSpy'][_0x2d92f3(0x155)]({'where':{'id':_0x5c5e70[_0x2d92f3(0x13a)]['id']}})['then'](handleEntityNotFound(_0x1ea7da,null))[_0x2d92f3(0x152)](removeEntity(_0x1ea7da,null))[_0x2d92f3(0x134)](handleError(_0x1ea7da,null));};
\ No newline at end of file
+const a856_0x556c=['end','query','VIRTUAL','filters','rows','user','fieldName','UserProfileSection','offset','../../components/parsers/qs','stack','type','lodash','attributes','userProfileId','get','role','index','../../config/logger','where','map','body','then','includeAll','key','catch','limit','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','sendStatus','pick','findAll','params','keys','findOne','fields','update','destroy','model','api','sequelize','intersection','count','filter','status','like','merge','name','include','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','autoAssociation','options','VoiceChanSpy','json','sort','length'];(function(_0x32ff9a,_0x2aa3b7){const _0x556c29=function(_0x490818){while(--_0x490818){_0x32ff9a['push'](_0x32ff9a['shift']());}};_0x556c29(++_0x2aa3b7);}(a856_0x556c,0x1d4));const a856_0x4908=function(_0x32ff9a,_0x2aa3b7){_0x32ff9a=_0x32ff9a-0x134;let _0x556c29=a856_0x556c[_0x32ff9a];return _0x556c29;};const a856_0x4a6f4e=a856_0x4908;'use strict';const _=require(a856_0x4a6f4e(0x164)),qs=require(a856_0x4a6f4e(0x161)),logger=require(a856_0x4a6f4e(0x16a))(a856_0x4a6f4e(0x146)),{db}=require('../../mysqldb'),{Op}=require(a856_0x4a6f4e(0x147));function respondWithResult(_0x25d27c,_0x481a86){return _0x481a86=_0x481a86||0xc8,function(_0x53e72a){const _0x43cc0c=a856_0x4908;if(_0x53e72a)return _0x25d27c[_0x43cc0c(0x14b)](_0x481a86)[_0x43cc0c(0x155)](_0x53e72a);};}function respondWithFilteredResult(_0x7c1a64,_0x458985){return function(_0x56da43){const _0x4763a0=a856_0x4908;if(_0x56da43){const _0x3808a0=_0x56da43[_0x4763a0(0x149)],_0x5691fd=_0x458985['offset'];let _0x5d123b=_0x458985[_0x4763a0(0x160)]+_0x458985[_0x4763a0(0x13a)],_0x62e79f;return _0x5d123b>=_0x3808a0?(_0x5d123b=_0x3808a0,_0x62e79f=0xc8):_0x62e79f=0xce,_0x7c1a64[_0x4763a0(0x14b)](_0x62e79f),_0x7c1a64['set']('Content-Range',_0x5691fd+'-'+_0x5d123b+'/'+_0x3808a0)[_0x4763a0(0x155)](_0x56da43);}return null;};}function saveUpdates(_0x571131){return function(_0x35725b){const _0x31b392=a856_0x4908;if(_0x35725b)return _0x35725b[_0x31b392(0x143)](_0x571131)[_0x31b392(0x136)](function(_0x2d84fd){return _0x2d84fd;});return null;};}function removeEntity(_0x5b623f){return function(_0x131ed1){const _0x2f34d4=a856_0x4908;if(_0x131ed1)return _0x131ed1['destroy']()[_0x2f34d4(0x136)](function(){const _0x51176b=_0x2f34d4,_0x7b98ef=_0x131ed1['get']({'plain':!![]}),_0x8bdf87='ChanSpies';return db['UserProfileResource'][_0x51176b(0x144)]({'where':{'type':_0x8bdf87,'resourceId':_0x7b98ef['id']}})[_0x51176b(0x136)](function(){return _0x131ed1;});})[_0x2f34d4(0x136)](function(){const _0x390ee9=_0x2f34d4;_0x5b623f[_0x390ee9(0x14b)](0xcc)[_0x390ee9(0x158)]();});};}function handleEntityNotFound(_0x21df88){return function(_0x4cb6db){const _0x2f5778=a856_0x4908;return!_0x4cb6db&&_0x21df88[_0x2f5778(0x13c)](0x194),_0x4cb6db;};}function handleError(_0x4e06ab,_0x58a580){return _0x58a580=_0x58a580||0x1f4,function(_0x2599e0){const _0x4f7e53=a856_0x4908;logger['error'](_0x2599e0[_0x4f7e53(0x162)]),_0x2599e0[_0x4f7e53(0x14e)]&&delete _0x2599e0['name'],_0x4e06ab['status'](_0x58a580)['send'](_0x2599e0);};}exports[a856_0x4a6f4e(0x169)]=function(_0x3f6ef4,_0x187575){const _0x35c2c4=a856_0x4a6f4e;let _0x40c344={};const _0x38b774={},_0x558e88={'count':0x0,'rows':[]},_0x235e55=_[_0x35c2c4(0x134)](db[_0x35c2c4(0x154)]['rawAttributes'],function(_0x3aeb4e){const _0x3d47da=_0x35c2c4;return{'name':_0x3aeb4e[_0x3d47da(0x15e)],'type':_0x3aeb4e[_0x3d47da(0x163)][_0x3d47da(0x138)]};});_0x38b774[_0x35c2c4(0x145)]=_[_0x35c2c4(0x134)](_0x235e55,_0x35c2c4(0x14e)),_0x38b774['query']=_['keys'](_0x3f6ef4[_0x35c2c4(0x159)]),_0x38b774[_0x35c2c4(0x15b)]=_[_0x35c2c4(0x148)](_0x38b774['model'],_0x38b774[_0x35c2c4(0x159)]),_0x40c344[_0x35c2c4(0x165)]=_[_0x35c2c4(0x148)](_0x38b774[_0x35c2c4(0x145)],qs[_0x35c2c4(0x142)](_0x3f6ef4[_0x35c2c4(0x159)]['fields'])),_0x40c344[_0x35c2c4(0x165)]=_0x40c344[_0x35c2c4(0x165)][_0x35c2c4(0x157)]?_0x40c344[_0x35c2c4(0x165)]:_0x38b774[_0x35c2c4(0x145)];typeof _0x3f6ef4[_0x35c2c4(0x159)]['nolimit']==='undefined'&&(_0x40c344[_0x35c2c4(0x13a)]=qs[_0x35c2c4(0x13a)](_0x3f6ef4[_0x35c2c4(0x159)]['limit']),_0x40c344[_0x35c2c4(0x160)]=qs['offset'](_0x3f6ef4['query'][_0x35c2c4(0x160)]));_0x40c344['order']=qs['sort'](_0x3f6ef4[_0x35c2c4(0x159)][_0x35c2c4(0x156)]),_0x40c344['where']=qs[_0x35c2c4(0x15b)](_[_0x35c2c4(0x13d)](_0x3f6ef4['query'],_0x38b774[_0x35c2c4(0x15b)]),_0x235e55);_0x3f6ef4[_0x35c2c4(0x159)][_0x35c2c4(0x14a)]&&(_0x40c344[_0x35c2c4(0x16b)]=_[_0x35c2c4(0x14d)](_0x40c344['where'],{[Op['or']]:_[_0x35c2c4(0x134)](_0x235e55,function(_0x281c82){const _0x26c52b=_0x35c2c4;if(_0x281c82['type']!==_0x26c52b(0x15a)){const _0x2df15e={};return _0x2df15e[_0x281c82[_0x26c52b(0x14e)]]={[Op[_0x26c52b(0x14c)]]:'%'+_0x3f6ef4[_0x26c52b(0x159)][_0x26c52b(0x14a)]+'%'},_0x2df15e;}})}));_0x40c344=_[_0x35c2c4(0x14d)]({},_0x40c344,_0x3f6ef4[_0x35c2c4(0x153)]);const _0x2541b9={'where':_0x40c344['where']};return db[_0x35c2c4(0x154)][_0x35c2c4(0x149)](_0x2541b9)[_0x35c2c4(0x136)](function(_0x42fe9e){const _0x3c07a1=_0x35c2c4;return _0x558e88[_0x3c07a1(0x149)]=_0x42fe9e,_0x3f6ef4[_0x3c07a1(0x159)][_0x3c07a1(0x137)]&&(_0x40c344[_0x3c07a1(0x14f)]=[{'all':!![]}]),db[_0x3c07a1(0x154)][_0x3c07a1(0x13e)](_0x40c344);})[_0x35c2c4(0x136)](function(_0x5320c7){const _0x487ca4=_0x35c2c4;return _0x558e88[_0x487ca4(0x15c)]=_0x5320c7,_0x558e88;})[_0x35c2c4(0x136)](respondWithFilteredResult(_0x187575,_0x40c344))['catch'](handleError(_0x187575,null));},exports['show']=function(_0x236c22,_0x3bbe9d){const _0x2fd92a=a856_0x4a6f4e;let _0x38f6e0={'raw':![],'where':{'id':_0x236c22[_0x2fd92a(0x13f)]['id']}};const _0x52c9f3={};return _0x52c9f3[_0x2fd92a(0x145)]=_[_0x2fd92a(0x140)](db[_0x2fd92a(0x154)]['rawAttributes']),_0x52c9f3[_0x2fd92a(0x159)]=_[_0x2fd92a(0x140)](_0x236c22[_0x2fd92a(0x159)]),_0x52c9f3[_0x2fd92a(0x15b)]=_[_0x2fd92a(0x148)](_0x52c9f3[_0x2fd92a(0x145)],_0x52c9f3[_0x2fd92a(0x159)]),_0x38f6e0['attributes']=_[_0x2fd92a(0x148)](_0x52c9f3[_0x2fd92a(0x145)],qs[_0x2fd92a(0x142)](_0x236c22[_0x2fd92a(0x159)]['fields'])),_0x38f6e0[_0x2fd92a(0x165)]=_0x38f6e0['attributes'][_0x2fd92a(0x157)]?_0x38f6e0[_0x2fd92a(0x165)]:_0x52c9f3[_0x2fd92a(0x145)],_0x236c22[_0x2fd92a(0x159)][_0x2fd92a(0x137)]&&(_0x38f6e0['include']=[{'all':!![]}]),_0x38f6e0=_[_0x2fd92a(0x14d)]({},_0x38f6e0,_0x236c22[_0x2fd92a(0x153)]),db['VoiceChanSpy']['findOne'](_0x38f6e0)[_0x2fd92a(0x136)](handleEntityNotFound(_0x3bbe9d,null))[_0x2fd92a(0x136)](respondWithResult(_0x3bbe9d,null))['catch'](handleError(_0x3bbe9d,null));},exports[a856_0x4a6f4e(0x150)]=function(_0x56def0,_0x478ef6){const _0x3c2272=a856_0x4a6f4e;return db[_0x3c2272(0x154)][_0x3c2272(0x150)](_0x56def0['body'],{})[_0x3c2272(0x136)](function(_0x18463){const _0x288bb0=_0x3c2272,_0x421370=_0x56def0[_0x288bb0(0x15d)]['get']({'plain':!![]});if(!_0x421370)throw new Error(_0x288bb0(0x151));if(_0x421370[_0x288bb0(0x168)]==='user'){const _0x754afc=_0x18463[_0x288bb0(0x167)]({'plain':!![]}),_0xede796='ChanSpies';return db[_0x288bb0(0x15f)][_0x288bb0(0x141)]({'where':{'name':_0xede796,'userProfileId':_0x421370[_0x288bb0(0x166)]},'raw':!![]})[_0x288bb0(0x136)](function(_0xa36d2e){const _0xa75f0d=_0x288bb0;return _0xa36d2e&&_0xa36d2e[_0xa75f0d(0x152)]===0x0?db['UserProfileResource']['create']({'name':_0x754afc[_0xa75f0d(0x14e)],'resourceId':_0x754afc['id'],'type':_0xa36d2e['name'],'sectionId':_0xa36d2e['id']},{})[_0xa75f0d(0x136)](function(){return _0x18463;}):_0x18463;})[_0x288bb0(0x139)](function(_0x553a71){const _0x109474=_0x288bb0;logger['error'](_0x109474(0x13b),_0x553a71);throw _0x553a71;});}return _0x18463;})[_0x3c2272(0x136)](respondWithResult(_0x478ef6,0xc9))[_0x3c2272(0x139)](handleError(_0x478ef6,null));},exports[a856_0x4a6f4e(0x143)]=function(_0x2e4b33,_0x1c801f){const _0x2cd86d=a856_0x4a6f4e;return _0x2e4b33['body']['id']&&delete _0x2e4b33['body']['id'],db[_0x2cd86d(0x154)][_0x2cd86d(0x141)]({'where':{'id':_0x2e4b33[_0x2cd86d(0x13f)]['id']}})[_0x2cd86d(0x136)](handleEntityNotFound(_0x1c801f,null))[_0x2cd86d(0x136)](saveUpdates(_0x2e4b33[_0x2cd86d(0x135)],null))[_0x2cd86d(0x136)](respondWithResult(_0x1c801f,null))[_0x2cd86d(0x139)](handleError(_0x1c801f,null));},exports[a856_0x4a6f4e(0x144)]=function(_0x506ccf,_0x2c6839){const _0x47d098=a856_0x4a6f4e;return db[_0x47d098(0x154)]['findOne']({'where':{'id':_0x506ccf[_0x47d098(0x13f)]['id']}})[_0x47d098(0x136)](handleEntityNotFound(_0x2c6839,null))[_0x47d098(0x136)](removeEntity(_0x2c6839,null))['catch'](handleError(_0x2c6839,null));};
\ No newline at end of file