Built motion from commit ecf5ab8ec560fd4c6972692268e350fcef2f38e7. Version 3.0.0...
[motion-next.git] / server / api / intDeskConfiguration / intDeskConfiguration.controller.js
1 const a234_0x39f0=['rows','params','status','fields','findOne','error','options','DeskField','map','rawAttributes','intersection','fieldName','DeskConfiguration','findAll','offset','key','pick','filter','json','end','name','where','limit','attributes','query','filters','nolimit','type','getDescriptions','sequelize','catch','merge','Tag','model','length','includeAll','create','include','sort','Content-Range','ids','update','getSubjects','keys','setTags','api','VIRTUAL','like','count','order','body','getFields','then','stack','getTags','undefined'];(function(_0x2f4c5e,_0x39f01f){const _0x2b5e45=function(_0x2619e2){while(--_0x2619e2){_0x2f4c5e['push'](_0x2f4c5e['shift']());}};_0x2b5e45(++_0x39f01f);}(a234_0x39f0,0x16e));const a234_0x2b5e=function(_0x2f4c5e,_0x39f01f){_0x2f4c5e=_0x2f4c5e-0x0;let _0x2b5e45=a234_0x39f0[_0x2f4c5e];return _0x2b5e45;};const _0xba63f6=a234_0x2b5e;'use strict';const _=require('lodash'),qs=require('../../components/parsers/qs'),logger=require('../../config/logger')(_0xba63f6('0xf')),db=require('../../mysqldb')['db'],{Op}=require(_0xba63f6('0x37'));function respondWithResult(_0x2619e2,_0x340c61){return _0x340c61=_0x340c61||0xc8,function(_0x4428e5){const _0x3b0dbc=a234_0x2b5e;if(_0x4428e5)return _0x2619e2[_0x3b0dbc('0x1c')](_0x340c61)[_0x3b0dbc('0x2c')](_0x4428e5);};}function respondWithFilteredResult(_0x2c04a5,_0x123a13){return function(_0x43a013){const _0x120722=a234_0x2b5e;if(_0x43a013){const _0x2b3dc9=_0x43a013[_0x120722('0x12')],_0x5e798e=_0x123a13[_0x120722('0x28')];let _0x3b0655=_0x123a13[_0x120722('0x28')]+_0x123a13['limit'],_0x2ffcf6;return _0x3b0655>=_0x2b3dc9?(_0x3b0655=_0x2b3dc9,_0x2ffcf6=0xc8):_0x2ffcf6=0xce,_0x2c04a5[_0x120722('0x1c')](_0x2ffcf6),_0x2c04a5['set'](_0x120722('0x9'),_0x5e798e+'-'+_0x3b0655+'/'+_0x2b3dc9)[_0x120722('0x2c')](_0x43a013);}return null;};}function saveUpdates(_0x46c71c){return function(_0x3885db){const _0x230707=a234_0x2b5e;if(_0x3885db)return _0x3885db[_0x230707('0xb')](_0x46c71c)[_0x230707('0x16')](function(_0x1459aa){return _0x1459aa;});return null;};}function removeEntity(_0x22c943){return function(_0x11af24){if(_0x11af24)return _0x11af24['destroy']()['then'](function(){const _0x364c68=a234_0x2b5e;_0x22c943['status'](0xcc)[_0x364c68('0x2d')]();});};}function handleEntityNotFound(_0x561ac0){return function(_0x1c03c6){return!_0x1c03c6&&_0x561ac0['sendStatus'](0x194),_0x1c03c6;};}function handleError(_0x5c1a1c,_0x5d60b7){return _0x5d60b7=_0x5d60b7||0x1f4,function(_0x139ab7){const _0x5bafce=a234_0x2b5e;logger[_0x5bafce('0x1f')](_0x139ab7[_0x5bafce('0x17')]),_0x139ab7['name']&&delete _0x139ab7[_0x5bafce('0x2e')],_0x5c1a1c['status'](_0x5d60b7)['send'](_0x139ab7);};}exports['index']=function(_0x3ab553,_0x550963){const _0x963fe4=_0xba63f6;let _0xa8d063={};const _0x45c6bb={},_0x22644b={'count':0x0,'rows':[]},_0x2a5402=_['map'](db[_0x963fe4('0x26')]['rawAttributes'],function(_0x15cfc4){const _0x1ea8d7=_0x963fe4;return{'name':_0x15cfc4[_0x1ea8d7('0x25')],'type':_0x15cfc4[_0x1ea8d7('0x35')][_0x1ea8d7('0x29')]};});_0x45c6bb[_0x963fe4('0x3')]=_[_0x963fe4('0x22')](_0x2a5402,'name'),_0x45c6bb[_0x963fe4('0x32')]=_[_0x963fe4('0xd')](_0x3ab553['query']),_0x45c6bb[_0x963fe4('0x33')]=_[_0x963fe4('0x24')](_0x45c6bb[_0x963fe4('0x3')],_0x45c6bb[_0x963fe4('0x32')]),_0xa8d063['attributes']=_['intersection'](_0x45c6bb[_0x963fe4('0x3')],qs[_0x963fe4('0x1d')](_0x3ab553[_0x963fe4('0x32')][_0x963fe4('0x1d')])),_0xa8d063[_0x963fe4('0x31')]=_0xa8d063[_0x963fe4('0x31')][_0x963fe4('0x4')]?_0xa8d063[_0x963fe4('0x31')]:_0x45c6bb[_0x963fe4('0x3')];typeof _0x3ab553[_0x963fe4('0x32')]['nolimit']===_0x963fe4('0x19')&&(_0xa8d063[_0x963fe4('0x30')]=qs[_0x963fe4('0x30')](_0x3ab553['query'][_0x963fe4('0x30')]),_0xa8d063['offset']=qs[_0x963fe4('0x28')](_0x3ab553[_0x963fe4('0x32')]['offset']));_0xa8d063[_0x963fe4('0x13')]=qs[_0x963fe4('0x8')](_0x3ab553[_0x963fe4('0x32')][_0x963fe4('0x8')]),_0xa8d063['where']=qs[_0x963fe4('0x33')](_['pick'](_0x3ab553['query'],_0x45c6bb[_0x963fe4('0x33')]),_0x2a5402);_0x3ab553[_0x963fe4('0x32')][_0x963fe4('0x2b')]&&(_0xa8d063[_0x963fe4('0x2f')]=_[_0x963fe4('0x1')](_0xa8d063[_0x963fe4('0x2f')],{[Op['or']]:_['map'](_0x2a5402,function(_0x44f8d7){const _0x1a07e1=_0x963fe4;if(_0x44f8d7[_0x1a07e1('0x35')]!==_0x1a07e1('0x10')){const _0x2fc814={};return _0x2fc814[_0x44f8d7['name']]={[Op[_0x1a07e1('0x11')]]:'%'+_0x3ab553[_0x1a07e1('0x32')]['filter']+'%'},_0x2fc814;}})}));_0xa8d063=_[_0x963fe4('0x1')]({},_0xa8d063,_0x3ab553[_0x963fe4('0x20')]);const _0x143d90={'where':_0xa8d063['where']};return db[_0x963fe4('0x26')]['count'](_0x143d90)[_0x963fe4('0x16')](function(_0x23f38d){const _0x2c9806=_0x963fe4;return _0x22644b[_0x2c9806('0x12')]=_0x23f38d,_0x3ab553[_0x2c9806('0x32')][_0x2c9806('0x5')]&&(_0xa8d063['include']=[{'all':!![]}]),db[_0x2c9806('0x26')][_0x2c9806('0x27')](_0xa8d063);})[_0x963fe4('0x16')](function(_0x455844){const _0x49ca8c=_0x963fe4;return _0x22644b[_0x49ca8c('0x1a')]=_0x455844,_0x22644b;})['then'](respondWithFilteredResult(_0x550963,_0xa8d063))[_0x963fe4('0x0')](handleError(_0x550963,null));},exports['show']=function(_0x549f9c,_0x201eda){const _0x46d095=_0xba63f6;let _0xe88566={'raw':![],'where':{'id':_0x549f9c['params']['id']}};const _0x4ba212={};return _0x4ba212['model']=_[_0x46d095('0xd')](db['DeskConfiguration']['rawAttributes']),_0x4ba212['query']=_[_0x46d095('0xd')](_0x549f9c[_0x46d095('0x32')]),_0x4ba212['filters']=_[_0x46d095('0x24')](_0x4ba212[_0x46d095('0x3')],_0x4ba212[_0x46d095('0x32')]),_0xe88566['attributes']=_[_0x46d095('0x24')](_0x4ba212[_0x46d095('0x3')],qs['fields'](_0x549f9c[_0x46d095('0x32')][_0x46d095('0x1d')])),_0xe88566[_0x46d095('0x31')]=_0xe88566[_0x46d095('0x31')][_0x46d095('0x4')]?_0xe88566[_0x46d095('0x31')]:_0x4ba212[_0x46d095('0x3')],_0x549f9c[_0x46d095('0x32')][_0x46d095('0x5')]&&(_0xe88566[_0x46d095('0x7')]=[{'all':!![]}]),_0xe88566=_[_0x46d095('0x1')]({},_0xe88566,_0x549f9c[_0x46d095('0x20')]),db['DeskConfiguration'][_0x46d095('0x1e')](_0xe88566)[_0x46d095('0x16')](handleEntityNotFound(_0x201eda,null))['then'](respondWithResult(_0x201eda,null))[_0x46d095('0x0')](handleError(_0x201eda,null));},exports[_0xba63f6('0x6')]=function(_0x3d7136,_0x4bf4c2){const _0xefac45=_0xba63f6;return db[_0xefac45('0x26')]['create'](_0x3d7136[_0xefac45('0x14')],{})[_0xefac45('0x16')](respondWithResult(_0x4bf4c2,0xc9))['catch'](handleError(_0x4bf4c2,null));},exports[_0xba63f6('0xb')]=function(_0x529d37,_0xa76b25){const _0x582698=_0xba63f6;return _0x529d37[_0x582698('0x14')]['id']&&delete _0x529d37[_0x582698('0x14')]['id'],db[_0x582698('0x26')][_0x582698('0x1e')]({'where':{'id':_0x529d37['params']['id']}})[_0x582698('0x16')](handleEntityNotFound(_0xa76b25,null))[_0x582698('0x16')](saveUpdates(_0x529d37['body'],null))[_0x582698('0x16')](respondWithResult(_0xa76b25,null))['catch'](handleError(_0xa76b25,null));},exports['destroy']=function(_0x54b627,_0x172967){const _0x10ff97=_0xba63f6;return db[_0x10ff97('0x26')][_0x10ff97('0x1e')]({'where':{'id':_0x54b627[_0x10ff97('0x1b')]['id']}})['then'](handleEntityNotFound(_0x172967,null))['then'](removeEntity(_0x172967,null))[_0x10ff97('0x0')](handleError(_0x172967,null));},exports[_0xba63f6('0x15')]=function(_0x40cf60,_0x45ef7d){const _0x80ad31=_0xba63f6;let _0x46cfe2={};const _0x109df2={};let _0x4a2dad,_0xe3e7ed;return db[_0x80ad31('0x26')][_0x80ad31('0x1e')]({'where':{'id':_0x40cf60[_0x80ad31('0x1b')]['id']}})[_0x80ad31('0x16')](handleEntityNotFound(_0x45ef7d,null))[_0x80ad31('0x16')](function(_0x2c468b){const _0x24d157=_0x80ad31;if(_0x2c468b)return _0x4a2dad=_0x2c468b,_0x109df2[_0x24d157('0x3')]=_[_0x24d157('0xd')](db[_0x24d157('0x21')][_0x24d157('0x23')]),_0x109df2[_0x24d157('0x32')]=_[_0x24d157('0xd')](_0x40cf60['query']),_0x109df2[_0x24d157('0x33')]=_[_0x24d157('0x24')](_0x109df2[_0x24d157('0x3')],_0x109df2[_0x24d157('0x32')]),_0x46cfe2[_0x24d157('0x31')]=_[_0x24d157('0x24')](_0x109df2['model'],qs[_0x24d157('0x1d')](_0x40cf60['query'][_0x24d157('0x1d')])),_0x46cfe2[_0x24d157('0x31')]=_0x46cfe2[_0x24d157('0x31')][_0x24d157('0x4')]?_0x46cfe2[_0x24d157('0x31')]:_0x109df2[_0x24d157('0x3')],_0x46cfe2['order']=qs[_0x24d157('0x8')](_0x40cf60[_0x24d157('0x32')]['sort']),_0x46cfe2['where']=qs[_0x24d157('0x33')](_['pick'](_0x40cf60['query'],_0x109df2[_0x24d157('0x33')])),_0x40cf60['query'][_0x24d157('0x2b')]&&(_0x46cfe2[_0x24d157('0x2f')]=_[_0x24d157('0x1')](_0x46cfe2[_0x24d157('0x2f')],{[Op['or']]:_[_0x24d157('0x22')](_0x46cfe2[_0x24d157('0x31')],function(_0x4820d9){const _0x57cd76=_0x24d157,_0x35d9be={};return _0x35d9be[_0x4820d9]={[Op['like']]:'%'+_0x40cf60[_0x57cd76('0x32')]['filter']+'%'},_0x35d9be;})})),_0x46cfe2=_[_0x24d157('0x1')]({},_0x46cfe2,_0x40cf60[_0x24d157('0x20')]),_0x4a2dad['getFields'](_0x46cfe2);})['then'](function(_0x486f11){const _0x41cd79=_0x80ad31;if(_0x486f11)return _0xe3e7ed=_0x486f11[_0x41cd79('0x4')],typeof _0x40cf60[_0x41cd79('0x32')][_0x41cd79('0x34')]===_0x41cd79('0x19')&&(_0x46cfe2[_0x41cd79('0x30')]=qs[_0x41cd79('0x30')](_0x40cf60[_0x41cd79('0x32')][_0x41cd79('0x30')]),_0x46cfe2[_0x41cd79('0x28')]=qs[_0x41cd79('0x28')](_0x40cf60[_0x41cd79('0x32')]['offset'])),_0x4a2dad[_0x41cd79('0x15')](_0x46cfe2);})[_0x80ad31('0x16')](function(_0x55ba1f){if(_0x55ba1f)return _0x55ba1f?{'count':_0xe3e7ed,'rows':_0x55ba1f}:null;})[_0x80ad31('0x16')](respondWithResult(_0x45ef7d,null))[_0x80ad31('0x0')](handleError(_0x45ef7d,null));},exports['getSubjects']=function(_0x4a96ef,_0x414baa){const _0xd39306=_0xba63f6;let _0x5e9f33={};const _0x557e9b={};let _0x4dfc5c,_0x23ca3a;return db[_0xd39306('0x26')]['findOne']({'where':{'id':_0x4a96ef[_0xd39306('0x1b')]['id']}})[_0xd39306('0x16')](handleEntityNotFound(_0x414baa,null))[_0xd39306('0x16')](function(_0x17f00a){const _0x58532c=_0xd39306;if(_0x17f00a)return _0x4dfc5c=_0x17f00a,_0x557e9b[_0x58532c('0x3')]=_[_0x58532c('0xd')](db[_0x58532c('0x21')]['rawAttributes']),_0x557e9b[_0x58532c('0x32')]=_['keys'](_0x4a96ef[_0x58532c('0x32')]),_0x557e9b[_0x58532c('0x33')]=_['intersection'](_0x557e9b[_0x58532c('0x3')],_0x557e9b[_0x58532c('0x32')]),_0x5e9f33[_0x58532c('0x31')]=_[_0x58532c('0x24')](_0x557e9b[_0x58532c('0x3')],qs['fields'](_0x4a96ef[_0x58532c('0x32')]['fields'])),_0x5e9f33[_0x58532c('0x31')]=_0x5e9f33[_0x58532c('0x31')]['length']?_0x5e9f33[_0x58532c('0x31')]:_0x557e9b[_0x58532c('0x3')],_0x5e9f33[_0x58532c('0x13')]=qs['sort'](_0x4a96ef['query'][_0x58532c('0x8')]),_0x5e9f33[_0x58532c('0x2f')]=qs[_0x58532c('0x33')](_[_0x58532c('0x2a')](_0x4a96ef[_0x58532c('0x32')],_0x557e9b['filters'])),_0x4a96ef[_0x58532c('0x32')][_0x58532c('0x2b')]&&(_0x5e9f33[_0x58532c('0x2f')]=_[_0x58532c('0x1')](_0x5e9f33['where'],{[Op['or']]:_[_0x58532c('0x22')](_0x5e9f33['attributes'],function(_0x29411a){const _0x220ff7=_0x58532c,_0x731b27={};return _0x731b27[_0x29411a]={[Op[_0x220ff7('0x11')]]:'%'+_0x4a96ef[_0x220ff7('0x32')][_0x220ff7('0x2b')]+'%'},_0x731b27;})})),_0x5e9f33=_[_0x58532c('0x1')]({},_0x5e9f33,_0x4a96ef[_0x58532c('0x20')]),_0x4dfc5c[_0x58532c('0xc')](_0x5e9f33);})[_0xd39306('0x16')](function(_0x36cafa){const _0x5c8a90=_0xd39306;if(_0x36cafa)return _0x23ca3a=_0x36cafa['length'],typeof _0x4a96ef['query'][_0x5c8a90('0x34')]==='undefined'&&(_0x5e9f33[_0x5c8a90('0x30')]=qs[_0x5c8a90('0x30')](_0x4a96ef[_0x5c8a90('0x32')][_0x5c8a90('0x30')]),_0x5e9f33[_0x5c8a90('0x28')]=qs[_0x5c8a90('0x28')](_0x4a96ef[_0x5c8a90('0x32')][_0x5c8a90('0x28')])),_0x4dfc5c[_0x5c8a90('0xc')](_0x5e9f33);})['then'](function(_0x27eae1){if(_0x27eae1)return _0x27eae1?{'count':_0x23ca3a,'rows':_0x27eae1}:null;})[_0xd39306('0x16')](respondWithResult(_0x414baa,null))['catch'](handleError(_0x414baa,null));},exports[_0xba63f6('0x36')]=function(_0x113b38,_0x49c7b9){const _0x294bd1=_0xba63f6;let _0x3ad054={};const _0x178e98={};let _0x98006e,_0x428913;return db[_0x294bd1('0x26')][_0x294bd1('0x1e')]({'where':{'id':_0x113b38[_0x294bd1('0x1b')]['id']}})[_0x294bd1('0x16')](handleEntityNotFound(_0x49c7b9,null))[_0x294bd1('0x16')](function(_0x21386c){const _0x4fd1c3=_0x294bd1;if(_0x21386c)return _0x98006e=_0x21386c,_0x178e98[_0x4fd1c3('0x3')]=_[_0x4fd1c3('0xd')](db[_0x4fd1c3('0x21')][_0x4fd1c3('0x23')]),_0x178e98[_0x4fd1c3('0x32')]=_['keys'](_0x113b38[_0x4fd1c3('0x32')]),_0x178e98['filters']=_['intersection'](_0x178e98[_0x4fd1c3('0x3')],_0x178e98['query']),_0x3ad054['attributes']=_[_0x4fd1c3('0x24')](_0x178e98[_0x4fd1c3('0x3')],qs[_0x4fd1c3('0x1d')](_0x113b38[_0x4fd1c3('0x32')]['fields'])),_0x3ad054[_0x4fd1c3('0x31')]=_0x3ad054[_0x4fd1c3('0x31')][_0x4fd1c3('0x4')]?_0x3ad054[_0x4fd1c3('0x31')]:_0x178e98[_0x4fd1c3('0x3')],_0x3ad054['order']=qs[_0x4fd1c3('0x8')](_0x113b38[_0x4fd1c3('0x32')][_0x4fd1c3('0x8')]),_0x3ad054[_0x4fd1c3('0x2f')]=qs[_0x4fd1c3('0x33')](_['pick'](_0x113b38['query'],_0x178e98[_0x4fd1c3('0x33')])),_0x113b38['query'][_0x4fd1c3('0x2b')]&&(_0x3ad054[_0x4fd1c3('0x2f')]=_[_0x4fd1c3('0x1')](_0x3ad054['where'],{[Op['or']]:_[_0x4fd1c3('0x22')](_0x3ad054['attributes'],function(_0x128bc1){const _0x4f8340=_0x4fd1c3,_0x5f33ce={};return _0x5f33ce[_0x128bc1]={[Op['like']]:'%'+_0x113b38[_0x4f8340('0x32')][_0x4f8340('0x2b')]+'%'},_0x5f33ce;})})),_0x3ad054=_['merge']({},_0x3ad054,_0x113b38[_0x4fd1c3('0x20')]),_0x98006e[_0x4fd1c3('0x36')](_0x3ad054);})[_0x294bd1('0x16')](function(_0x49d9d0){const _0x881baf=_0x294bd1;if(_0x49d9d0)return _0x428913=_0x49d9d0[_0x881baf('0x4')],typeof _0x113b38['query'][_0x881baf('0x34')]===_0x881baf('0x19')&&(_0x3ad054[_0x881baf('0x30')]=qs[_0x881baf('0x30')](_0x113b38['query']['limit']),_0x3ad054[_0x881baf('0x28')]=qs[_0x881baf('0x28')](_0x113b38[_0x881baf('0x32')][_0x881baf('0x28')])),_0x98006e['getDescriptions'](_0x3ad054);})['then'](function(_0x100879){if(_0x100879)return _0x100879?{'count':_0x428913,'rows':_0x100879}:null;})[_0x294bd1('0x16')](respondWithResult(_0x49c7b9,null))['catch'](handleError(_0x49c7b9,null));},exports[_0xba63f6('0x18')]=function(_0x5e17f8,_0x231a80){const _0x2baf5b=_0xba63f6;let _0x48b89b={};const _0x424626={};let _0x335155,_0x226fab;return db[_0x2baf5b('0x26')][_0x2baf5b('0x1e')]({'where':{'id':_0x5e17f8[_0x2baf5b('0x1b')]['id']}})[_0x2baf5b('0x16')](handleEntityNotFound(_0x231a80,null))[_0x2baf5b('0x16')](function(_0x1e49eb){const _0x24a8a9=_0x2baf5b;if(_0x1e49eb)return _0x335155=_0x1e49eb,_0x424626[_0x24a8a9('0x3')]=_[_0x24a8a9('0xd')](db[_0x24a8a9('0x2')]['rawAttributes']),_0x424626['query']=_['keys'](_0x5e17f8[_0x24a8a9('0x32')]),_0x424626[_0x24a8a9('0x33')]=_[_0x24a8a9('0x24')](_0x424626[_0x24a8a9('0x3')],_0x424626[_0x24a8a9('0x32')]),_0x48b89b[_0x24a8a9('0x31')]=_[_0x24a8a9('0x24')](_0x424626[_0x24a8a9('0x3')],qs['fields'](_0x5e17f8['query'][_0x24a8a9('0x1d')])),_0x48b89b[_0x24a8a9('0x31')]=_0x48b89b[_0x24a8a9('0x31')]['length']?_0x48b89b[_0x24a8a9('0x31')]:_0x424626[_0x24a8a9('0x3')],_0x48b89b[_0x24a8a9('0x13')]=qs[_0x24a8a9('0x8')](_0x5e17f8[_0x24a8a9('0x32')][_0x24a8a9('0x8')]),_0x48b89b['where']=qs[_0x24a8a9('0x33')](_[_0x24a8a9('0x2a')](_0x5e17f8[_0x24a8a9('0x32')],_0x424626[_0x24a8a9('0x33')])),_0x5e17f8[_0x24a8a9('0x32')][_0x24a8a9('0x2b')]&&(_0x48b89b[_0x24a8a9('0x2f')]=_[_0x24a8a9('0x1')](_0x48b89b[_0x24a8a9('0x2f')],{[Op['or']]:_[_0x24a8a9('0x22')](_0x48b89b[_0x24a8a9('0x31')],function(_0x5cf004){const _0x1b216a=_0x24a8a9,_0x1f7582={};return _0x1f7582[_0x5cf004]={[Op[_0x1b216a('0x11')]]:'%'+_0x5e17f8[_0x1b216a('0x32')][_0x1b216a('0x2b')]+'%'},_0x1f7582;})})),_0x48b89b=_[_0x24a8a9('0x1')]({},_0x48b89b,_0x5e17f8[_0x24a8a9('0x20')]),_0x335155[_0x24a8a9('0x18')](_0x48b89b);})[_0x2baf5b('0x16')](function(_0x209338){const _0x3a224a=_0x2baf5b;if(_0x209338)return _0x226fab=_0x209338[_0x3a224a('0x4')],typeof _0x5e17f8[_0x3a224a('0x32')][_0x3a224a('0x34')]===_0x3a224a('0x19')&&(_0x48b89b[_0x3a224a('0x30')]=qs[_0x3a224a('0x30')](_0x5e17f8['query'][_0x3a224a('0x30')]),_0x48b89b['offset']=qs[_0x3a224a('0x28')](_0x5e17f8[_0x3a224a('0x32')]['offset'])),_0x335155[_0x3a224a('0x18')](_0x48b89b);})[_0x2baf5b('0x16')](function(_0x380660){if(_0x380660)return _0x380660?{'count':_0x226fab,'rows':_0x380660}:null;})[_0x2baf5b('0x16')](respondWithResult(_0x231a80,null))['catch'](handleError(_0x231a80,null));},exports[_0xba63f6('0xe')]=function(_0x352e11,_0x40d297){const _0x50ab9f=_0xba63f6;return _0x352e11['body']['id']&&delete _0x352e11[_0x50ab9f('0x14')]['id'],db['DeskConfiguration'][_0x50ab9f('0x1e')]({'where':{'id':_0x352e11[_0x50ab9f('0x1b')]['id']}})[_0x50ab9f('0x16')](handleEntityNotFound(_0x40d297,null))[_0x50ab9f('0x16')](function(_0x252108){const _0x2f766d=_0x50ab9f;if(_0x252108)return _0x252108['setTags'](_0x352e11[_0x2f766d('0x14')][_0x2f766d('0xa')]||[]);return null;})['then'](respondWithResult(_0x40d297,null))[_0x50ab9f('0x0')](handleError(_0x40d297,null));};