Built motion from commit e493b9a4954b50a8ee6d0034ba3601cd210d989d. Version 3.0.0...
[motion-next.git] / server / api / intZendeskConfiguration / intZendeskConfiguration.controller.js
1 'use strict';const a406_0x5e26=['rows','error','ids','model','lodash','111009BuTouM','findOne','body','sort','161809ZruQSR','include','215hUPZim','where','ZendeskConfiguration','create','destroy','update','count','setTags','name','92926CdaAUO','limit','getSubjects','send','filters','type','pick','undefined','offset','fields','146558paagOO','findAll','set','attributes','keys','filter','order','options','getDescriptions','1IiWfFY','index','6oXyQYq','3FjQZTR','getTags','then','@mysqldb','query','getFields','rawAttributes','length','status','map','api','124978fhTTDl','1223uncdMh','ZendeskField','@utils/filter-attributes','show','intersection','Content-Range','catch','params','stack','nolimit','includeAll','1047005FpmRPC'];const a406_0x1f99=function(_0x303188,_0x58603e){_0x303188=_0x303188-0x193;let _0x5e2663=a406_0x5e26[_0x303188];return _0x5e2663;};const a406_0x5c639b=a406_0x1f99;(function(_0x240383,_0x40b43d){const _0x101fdf=a406_0x1f99;while(!![]){try{const _0x545797=parseInt(_0x101fdf(0x1a5))+-parseInt(_0x101fdf(0x1b0))*-parseInt(_0x101fdf(0x1c5))+parseInt(_0x101fdf(0x1ba))+-parseInt(_0x101fdf(0x1d2))*-parseInt(_0x101fdf(0x1a7))+parseInt(_0x101fdf(0x1c3))*-parseInt(_0x101fdf(0x1d1))+-parseInt(_0x101fdf(0x1c6))*-parseInt(_0x101fdf(0x1a1))+-parseInt(_0x101fdf(0x19b));if(_0x545797===_0x40b43d)break;else _0x240383['push'](_0x240383['shift']());}catch(_0x2f8f6c){_0x240383['push'](_0x240383['shift']());}}}(a406_0x5e26,0x46c78));const _=require(a406_0x5c639b(0x1a0)),qs=require('@components/parsers/qs'),logger=require('@config/logger')(a406_0x5c639b(0x1d0)),{db}=require(a406_0x5c639b(0x1c9)),{filterAttributes}=require(a406_0x5c639b(0x1d4));function respondWithResult(_0xe2057,_0x3f8447){return _0x3f8447=_0x3f8447||0xc8,function(_0x1aa325){const _0x9e6584=a406_0x1f99;if(_0x1aa325)return _0xe2057[_0x9e6584(0x1ce)](_0x3f8447)['json'](_0x1aa325);};}function respondWithFilteredResult(_0x1c4f69,_0x34b479){return function(_0x4c681b){const _0x3e81f0=a406_0x1f99;if(_0x4c681b){const _0x4c1fc2=_0x4c681b[_0x3e81f0(0x1ad)],_0x17751d=_0x34b479[_0x3e81f0(0x1b8)];let _0x3de154=_0x34b479[_0x3e81f0(0x1b8)]+_0x34b479[_0x3e81f0(0x1b1)],_0x110b16;return _0x3de154>=_0x4c1fc2?(_0x3de154=_0x4c1fc2,_0x110b16=0xc8):_0x110b16=0xce,_0x1c4f69[_0x3e81f0(0x1ce)](_0x110b16),_0x1c4f69[_0x3e81f0(0x1bc)](_0x3e81f0(0x195),_0x17751d+'-'+_0x3de154+'/'+_0x4c1fc2)['json'](_0x4c681b);}return null;};}function saveUpdates(_0x58cc48){return function(_0x2bbbbb){const _0x1dd088=a406_0x1f99;if(_0x2bbbbb)return _0x2bbbbb['update'](_0x58cc48)[_0x1dd088(0x1c8)](function(_0x2d8655){return _0x2d8655;});return null;};}function removeEntity(_0x24dc5b){return function(_0x473626){const _0x2f0c27=a406_0x1f99;if(_0x473626)return _0x473626[_0x2f0c27(0x1ab)]()[_0x2f0c27(0x1c8)](function(){const _0xebea09=_0x2f0c27;_0x24dc5b[_0xebea09(0x1ce)](0xcc)['end']();});};}function handleEntityNotFound(_0x1e79f7){return function(_0x4861c3){return!_0x4861c3&&_0x1e79f7['sendStatus'](0x194),_0x4861c3;};}function handleError(_0x2e4ce7,_0x17c7b9){return _0x17c7b9=_0x17c7b9||0x1f4,function(_0x1a5a08){const _0x217780=a406_0x1f99;logger[_0x217780(0x19d)](_0x1a5a08[_0x217780(0x198)]),_0x1a5a08[_0x217780(0x1af)]&&delete _0x1a5a08[_0x217780(0x1af)],_0x2e4ce7[_0x217780(0x1ce)](_0x17c7b9)[_0x217780(0x1b3)](_0x1a5a08);};}exports[a406_0x5c639b(0x1c4)]=function(_0xf47969,_0x562abd){const _0x34e028=a406_0x5c639b;let _0x56a22c={};const _0x46cccd={},_0x2a3435={'count':0x0,'rows':[]},_0x1386bb=_['map'](db[_0x34e028(0x1a9)]['rawAttributes'],function(_0x225d57){const _0x1881a8=_0x34e028;return{'name':_0x225d57['fieldName'],'type':_0x225d57[_0x1881a8(0x1b5)]['key']};});_0x46cccd[_0x34e028(0x19f)]=_[_0x34e028(0x1cf)](_0x1386bb,_0x34e028(0x1af)),_0x46cccd[_0x34e028(0x1ca)]=_[_0x34e028(0x1be)](_0xf47969[_0x34e028(0x1ca)]),_0x46cccd[_0x34e028(0x1b4)]=_[_0x34e028(0x194)](_0x46cccd[_0x34e028(0x19f)],_0x46cccd[_0x34e028(0x1ca)]),_0x56a22c[_0x34e028(0x1bd)]=_[_0x34e028(0x194)](_0x46cccd[_0x34e028(0x19f)],qs[_0x34e028(0x1b9)](_0xf47969['query'][_0x34e028(0x1b9)])),_0x56a22c['attributes']=_0x56a22c[_0x34e028(0x1bd)][_0x34e028(0x1cd)]?_0x56a22c[_0x34e028(0x1bd)]:_0x46cccd['model'];typeof _0xf47969['query'][_0x34e028(0x199)]===_0x34e028(0x1b7)&&(_0x56a22c['limit']=qs[_0x34e028(0x1b1)](_0xf47969[_0x34e028(0x1ca)][_0x34e028(0x1b1)]),_0x56a22c['offset']=qs[_0x34e028(0x1b8)](_0xf47969['query'][_0x34e028(0x1b8)]));_0x56a22c[_0x34e028(0x1c0)]=qs[_0x34e028(0x1a4)](_0xf47969[_0x34e028(0x1ca)][_0x34e028(0x1a4)]),_0x56a22c[_0x34e028(0x1a8)]=qs[_0x34e028(0x1b4)](_[_0x34e028(0x1b6)](_0xf47969[_0x34e028(0x1ca)],_0x46cccd['filters']),_0x1386bb),_0x56a22c=filterAttributes(_0x56a22c,_0xf47969['query']['filter'],_0x1386bb,_0xf47969[_0x34e028(0x1c1)]);const _0x1e2ae3={'where':_0x56a22c[_0x34e028(0x1a8)]};return db[_0x34e028(0x1a9)][_0x34e028(0x1ad)](_0x1e2ae3)[_0x34e028(0x1c8)](function(_0x221e50){const _0x3e6823=_0x34e028;return _0x2a3435[_0x3e6823(0x1ad)]=_0x221e50,_0xf47969[_0x3e6823(0x1ca)][_0x3e6823(0x19a)]&&(_0x56a22c[_0x3e6823(0x1a6)]=[{'all':!![]}]),db[_0x3e6823(0x1a9)][_0x3e6823(0x1bb)](_0x56a22c);})[_0x34e028(0x1c8)](function(_0x5be578){const _0x596e82=_0x34e028;return _0x2a3435[_0x596e82(0x19c)]=_0x5be578,_0x2a3435;})[_0x34e028(0x1c8)](respondWithFilteredResult(_0x562abd,_0x56a22c))[_0x34e028(0x196)](handleError(_0x562abd,null));},exports[a406_0x5c639b(0x193)]=function(_0x2082e4,_0x8da9ce){const _0x1e96d0=a406_0x5c639b;let _0x48162e={'raw':![],'where':{'id':_0x2082e4[_0x1e96d0(0x197)]['id']}};const _0x318560={};return _0x318560[_0x1e96d0(0x19f)]=_['keys'](db[_0x1e96d0(0x1a9)][_0x1e96d0(0x1cc)]),_0x318560[_0x1e96d0(0x1ca)]=_['keys'](_0x2082e4[_0x1e96d0(0x1ca)]),_0x318560[_0x1e96d0(0x1b4)]=_[_0x1e96d0(0x194)](_0x318560[_0x1e96d0(0x19f)],_0x318560[_0x1e96d0(0x1ca)]),_0x48162e[_0x1e96d0(0x1bd)]=_[_0x1e96d0(0x194)](_0x318560['model'],qs[_0x1e96d0(0x1b9)](_0x2082e4[_0x1e96d0(0x1ca)][_0x1e96d0(0x1b9)])),_0x48162e[_0x1e96d0(0x1bd)]=_0x48162e['attributes'][_0x1e96d0(0x1cd)]?_0x48162e['attributes']:_0x318560['model'],_0x2082e4[_0x1e96d0(0x1ca)]['includeAll']&&(_0x48162e[_0x1e96d0(0x1a6)]=[{'all':!![]}]),_0x48162e=_['merge']({},_0x48162e,_0x2082e4[_0x1e96d0(0x1c1)]),db['ZendeskConfiguration'][_0x1e96d0(0x1a2)](_0x48162e)[_0x1e96d0(0x1c8)](handleEntityNotFound(_0x8da9ce,null))[_0x1e96d0(0x1c8)](respondWithResult(_0x8da9ce,null))[_0x1e96d0(0x196)](handleError(_0x8da9ce,null));},exports[a406_0x5c639b(0x1aa)]=function(_0x570cc9,_0x961b58){const _0x4b9603=a406_0x5c639b;return db[_0x4b9603(0x1a9)][_0x4b9603(0x1aa)](_0x570cc9[_0x4b9603(0x1a3)],{})[_0x4b9603(0x1c8)](respondWithResult(_0x961b58,0xc9))[_0x4b9603(0x196)](handleError(_0x961b58,null));},exports[a406_0x5c639b(0x1ac)]=function(_0x2d4d95,_0x5c6edc){const _0x3f64f8=a406_0x5c639b;return _0x2d4d95[_0x3f64f8(0x1a3)]['id']&&delete _0x2d4d95[_0x3f64f8(0x1a3)]['id'],db[_0x3f64f8(0x1a9)][_0x3f64f8(0x1a2)]({'where':{'id':_0x2d4d95[_0x3f64f8(0x197)]['id']}})[_0x3f64f8(0x1c8)](handleEntityNotFound(_0x5c6edc,null))[_0x3f64f8(0x1c8)](saveUpdates(_0x2d4d95['body'],null))[_0x3f64f8(0x1c8)](respondWithResult(_0x5c6edc,null))[_0x3f64f8(0x196)](handleError(_0x5c6edc,null));},exports[a406_0x5c639b(0x1ab)]=function(_0x4e713a,_0x4eff7f){const _0x2e16d9=a406_0x5c639b;return db[_0x2e16d9(0x1a9)][_0x2e16d9(0x1a2)]({'where':{'id':_0x4e713a[_0x2e16d9(0x197)]['id']}})[_0x2e16d9(0x1c8)](handleEntityNotFound(_0x4eff7f,null))[_0x2e16d9(0x1c8)](removeEntity(_0x4eff7f,null))['catch'](handleError(_0x4eff7f,null));},exports[a406_0x5c639b(0x1cb)]=function(_0x20d06d,_0x15b712){const _0x4a1d37=a406_0x5c639b;let _0x5d95bf={};const _0x5224bd={};let _0x1a3eb5,_0x314af8;return db[_0x4a1d37(0x1a9)]['findOne']({'where':{'id':_0x20d06d[_0x4a1d37(0x197)]['id']}})[_0x4a1d37(0x1c8)](handleEntityNotFound(_0x15b712,null))[_0x4a1d37(0x1c8)](function(_0x394500){const _0x512383=_0x4a1d37;if(_0x394500)return _0x1a3eb5=_0x394500,_0x5224bd[_0x512383(0x19f)]=_[_0x512383(0x1be)](db[_0x512383(0x1d3)][_0x512383(0x1cc)]),_0x5224bd[_0x512383(0x1ca)]=_[_0x512383(0x1be)](_0x20d06d[_0x512383(0x1ca)]),_0x5224bd[_0x512383(0x1b4)]=_['intersection'](_0x5224bd['model'],_0x5224bd['query']),_0x5d95bf[_0x512383(0x1bd)]=_[_0x512383(0x194)](_0x5224bd[_0x512383(0x19f)],qs[_0x512383(0x1b9)](_0x20d06d[_0x512383(0x1ca)][_0x512383(0x1b9)])),_0x5d95bf['attributes']=_0x5d95bf[_0x512383(0x1bd)]['length']?_0x5d95bf[_0x512383(0x1bd)]:_0x5224bd['model'],_0x5d95bf[_0x512383(0x1c0)]=qs['sort'](_0x20d06d[_0x512383(0x1ca)]['sort']),_0x5d95bf['where']=qs[_0x512383(0x1b4)](_[_0x512383(0x1b6)](_0x20d06d[_0x512383(0x1ca)],_0x5224bd['filters'])),_0x5d95bf=filterAttributes(_0x5d95bf,_0x20d06d[_0x512383(0x1ca)]['filter'],_0x5d95bf['attributes'],_0x20d06d[_0x512383(0x1c1)],![]),_0x1a3eb5['getFields'](_0x5d95bf);})[_0x4a1d37(0x1c8)](function(_0x2f2667){const _0x4172c7=_0x4a1d37;if(_0x2f2667)return _0x314af8=_0x2f2667[_0x4172c7(0x1cd)],typeof _0x20d06d['query'][_0x4172c7(0x199)]===_0x4172c7(0x1b7)&&(_0x5d95bf[_0x4172c7(0x1b1)]=qs[_0x4172c7(0x1b1)](_0x20d06d[_0x4172c7(0x1ca)][_0x4172c7(0x1b1)]),_0x5d95bf['offset']=qs[_0x4172c7(0x1b8)](_0x20d06d[_0x4172c7(0x1ca)][_0x4172c7(0x1b8)])),_0x1a3eb5[_0x4172c7(0x1cb)](_0x5d95bf);})[_0x4a1d37(0x1c8)](function(_0x8b94de){if(_0x8b94de)return _0x8b94de?{'count':_0x314af8,'rows':_0x8b94de}:null;})[_0x4a1d37(0x1c8)](respondWithResult(_0x15b712,null))['catch'](handleError(_0x15b712,null));},exports['getSubjects']=function(_0x4955ce,_0x574752){const _0x660c9a=a406_0x5c639b;let _0x3beca6={};const _0x3ddf58={};let _0x1bba2c,_0x11e470;return db[_0x660c9a(0x1a9)][_0x660c9a(0x1a2)]({'where':{'id':_0x4955ce[_0x660c9a(0x197)]['id']}})[_0x660c9a(0x1c8)](handleEntityNotFound(_0x574752,null))[_0x660c9a(0x1c8)](function(_0x7d6787){const _0x28684e=_0x660c9a;if(_0x7d6787)return _0x1bba2c=_0x7d6787,_0x3ddf58[_0x28684e(0x19f)]=_[_0x28684e(0x1be)](db['ZendeskField'][_0x28684e(0x1cc)]),_0x3ddf58[_0x28684e(0x1ca)]=_[_0x28684e(0x1be)](_0x4955ce['query']),_0x3ddf58[_0x28684e(0x1b4)]=_[_0x28684e(0x194)](_0x3ddf58[_0x28684e(0x19f)],_0x3ddf58['query']),_0x3beca6[_0x28684e(0x1bd)]=_['intersection'](_0x3ddf58[_0x28684e(0x19f)],qs['fields'](_0x4955ce[_0x28684e(0x1ca)]['fields'])),_0x3beca6[_0x28684e(0x1bd)]=_0x3beca6[_0x28684e(0x1bd)][_0x28684e(0x1cd)]?_0x3beca6[_0x28684e(0x1bd)]:_0x3ddf58[_0x28684e(0x19f)],_0x3beca6[_0x28684e(0x1c0)]=qs[_0x28684e(0x1a4)](_0x4955ce['query'][_0x28684e(0x1a4)]),_0x3beca6['where']=qs[_0x28684e(0x1b4)](_['pick'](_0x4955ce[_0x28684e(0x1ca)],_0x3ddf58[_0x28684e(0x1b4)])),_0x3beca6=filterAttributes(_0x3beca6,_0x4955ce['query'][_0x28684e(0x1bf)],_0x3beca6[_0x28684e(0x1bd)],_0x4955ce[_0x28684e(0x1c1)],![]),_0x1bba2c[_0x28684e(0x1b2)](_0x3beca6);})['then'](function(_0x49bdf8){const _0x5e1047=_0x660c9a;if(_0x49bdf8)return _0x11e470=_0x49bdf8[_0x5e1047(0x1cd)],typeof _0x4955ce[_0x5e1047(0x1ca)][_0x5e1047(0x199)]===_0x5e1047(0x1b7)&&(_0x3beca6[_0x5e1047(0x1b1)]=qs[_0x5e1047(0x1b1)](_0x4955ce[_0x5e1047(0x1ca)][_0x5e1047(0x1b1)]),_0x3beca6['offset']=qs[_0x5e1047(0x1b8)](_0x4955ce[_0x5e1047(0x1ca)][_0x5e1047(0x1b8)])),_0x1bba2c[_0x5e1047(0x1b2)](_0x3beca6);})[_0x660c9a(0x1c8)](function(_0x26da17){if(_0x26da17)return _0x26da17?{'count':_0x11e470,'rows':_0x26da17}:null;})[_0x660c9a(0x1c8)](respondWithResult(_0x574752,null))[_0x660c9a(0x196)](handleError(_0x574752,null));},exports['getDescriptions']=function(_0x24ce46,_0x4eae7c){const _0x540d1b=a406_0x5c639b;let _0xbb78ca={};const _0x5b2b77={};let _0x53cdab,_0x21a982;return db[_0x540d1b(0x1a9)][_0x540d1b(0x1a2)]({'where':{'id':_0x24ce46[_0x540d1b(0x197)]['id']}})['then'](handleEntityNotFound(_0x4eae7c,null))[_0x540d1b(0x1c8)](function(_0x3b3444){const _0xe32b8f=_0x540d1b;if(_0x3b3444)return _0x53cdab=_0x3b3444,_0x5b2b77[_0xe32b8f(0x19f)]=_[_0xe32b8f(0x1be)](db[_0xe32b8f(0x1d3)][_0xe32b8f(0x1cc)]),_0x5b2b77[_0xe32b8f(0x1ca)]=_[_0xe32b8f(0x1be)](_0x24ce46[_0xe32b8f(0x1ca)]),_0x5b2b77[_0xe32b8f(0x1b4)]=_[_0xe32b8f(0x194)](_0x5b2b77[_0xe32b8f(0x19f)],_0x5b2b77[_0xe32b8f(0x1ca)]),_0xbb78ca[_0xe32b8f(0x1bd)]=_[_0xe32b8f(0x194)](_0x5b2b77[_0xe32b8f(0x19f)],qs[_0xe32b8f(0x1b9)](_0x24ce46['query'][_0xe32b8f(0x1b9)])),_0xbb78ca[_0xe32b8f(0x1bd)]=_0xbb78ca[_0xe32b8f(0x1bd)][_0xe32b8f(0x1cd)]?_0xbb78ca['attributes']:_0x5b2b77[_0xe32b8f(0x19f)],_0xbb78ca[_0xe32b8f(0x1c0)]=qs[_0xe32b8f(0x1a4)](_0x24ce46['query'][_0xe32b8f(0x1a4)]),_0xbb78ca[_0xe32b8f(0x1a8)]=qs['filters'](_[_0xe32b8f(0x1b6)](_0x24ce46['query'],_0x5b2b77[_0xe32b8f(0x1b4)])),_0xbb78ca=filterAttributes(_0xbb78ca,_0x24ce46['query'][_0xe32b8f(0x1bf)],_0xbb78ca[_0xe32b8f(0x1bd)],_0x24ce46['options'],![]),_0x53cdab[_0xe32b8f(0x1c2)](_0xbb78ca);})['then'](function(_0x4aeac0){const _0x458d70=_0x540d1b;if(_0x4aeac0)return _0x21a982=_0x4aeac0[_0x458d70(0x1cd)],typeof _0x24ce46[_0x458d70(0x1ca)][_0x458d70(0x199)]===_0x458d70(0x1b7)&&(_0xbb78ca['limit']=qs[_0x458d70(0x1b1)](_0x24ce46['query'][_0x458d70(0x1b1)]),_0xbb78ca[_0x458d70(0x1b8)]=qs[_0x458d70(0x1b8)](_0x24ce46[_0x458d70(0x1ca)][_0x458d70(0x1b8)])),_0x53cdab[_0x458d70(0x1c2)](_0xbb78ca);})['then'](function(_0x88b8af){if(_0x88b8af)return _0x88b8af?{'count':_0x21a982,'rows':_0x88b8af}:null;})[_0x540d1b(0x1c8)](respondWithResult(_0x4eae7c,null))[_0x540d1b(0x196)](handleError(_0x4eae7c,null));},exports['getTags']=function(_0x418f83,_0x4381d5){const _0x3447a9=a406_0x5c639b;let _0x1ab7a8={};const _0x3a8665={};let _0x5d339f,_0x4c04d6;return db[_0x3447a9(0x1a9)][_0x3447a9(0x1a2)]({'where':{'id':_0x418f83[_0x3447a9(0x197)]['id']}})[_0x3447a9(0x1c8)](handleEntityNotFound(_0x4381d5,null))[_0x3447a9(0x1c8)](function(_0x22287b){const _0x13cd8f=_0x3447a9;if(_0x22287b)return _0x5d339f=_0x22287b,_0x3a8665[_0x13cd8f(0x19f)]=_[_0x13cd8f(0x1be)](db['Tag'][_0x13cd8f(0x1cc)]),_0x3a8665['query']=_[_0x13cd8f(0x1be)](_0x418f83[_0x13cd8f(0x1ca)]),_0x3a8665[_0x13cd8f(0x1b4)]=_[_0x13cd8f(0x194)](_0x3a8665[_0x13cd8f(0x19f)],_0x3a8665[_0x13cd8f(0x1ca)]),_0x1ab7a8['attributes']=_[_0x13cd8f(0x194)](_0x3a8665['model'],qs['fields'](_0x418f83[_0x13cd8f(0x1ca)][_0x13cd8f(0x1b9)])),_0x1ab7a8[_0x13cd8f(0x1bd)]=_0x1ab7a8[_0x13cd8f(0x1bd)][_0x13cd8f(0x1cd)]?_0x1ab7a8[_0x13cd8f(0x1bd)]:_0x3a8665[_0x13cd8f(0x19f)],_0x1ab7a8['order']=qs[_0x13cd8f(0x1a4)](_0x418f83[_0x13cd8f(0x1ca)]['sort']),_0x1ab7a8[_0x13cd8f(0x1a8)]=qs['filters'](_['pick'](_0x418f83[_0x13cd8f(0x1ca)],_0x3a8665[_0x13cd8f(0x1b4)])),_0x1ab7a8=filterAttributes(_0x1ab7a8,_0x418f83[_0x13cd8f(0x1ca)][_0x13cd8f(0x1bf)],_0x1ab7a8[_0x13cd8f(0x1bd)],_0x418f83[_0x13cd8f(0x1c1)],![]),_0x5d339f['getTags'](_0x1ab7a8);})[_0x3447a9(0x1c8)](function(_0x5dc796){const _0x108679=_0x3447a9;if(_0x5dc796)return _0x4c04d6=_0x5dc796[_0x108679(0x1cd)],typeof _0x418f83[_0x108679(0x1ca)]['nolimit']===_0x108679(0x1b7)&&(_0x1ab7a8[_0x108679(0x1b1)]=qs['limit'](_0x418f83[_0x108679(0x1ca)][_0x108679(0x1b1)]),_0x1ab7a8['offset']=qs[_0x108679(0x1b8)](_0x418f83[_0x108679(0x1ca)][_0x108679(0x1b8)])),_0x5d339f[_0x108679(0x1c7)](_0x1ab7a8);})[_0x3447a9(0x1c8)](function(_0xe36ada){if(_0xe36ada)return _0xe36ada?{'count':_0x4c04d6,'rows':_0xe36ada}:null;})[_0x3447a9(0x1c8)](respondWithResult(_0x4381d5,null))[_0x3447a9(0x196)](handleError(_0x4381d5,null));},exports[a406_0x5c639b(0x1ae)]=function(_0x408e68,_0x7df44b){const _0x3ddd97=a406_0x5c639b;return _0x408e68[_0x3ddd97(0x1a3)]['id']&&delete _0x408e68['body']['id'],db[_0x3ddd97(0x1a9)]['findOne']({'where':{'id':_0x408e68[_0x3ddd97(0x197)]['id']}})[_0x3ddd97(0x1c8)](handleEntityNotFound(_0x7df44b,null))['then'](function(_0xc3ab9c){const _0x1e696a=_0x3ddd97;if(_0xc3ab9c)return _0xc3ab9c[_0x1e696a(0x1ae)](_0x408e68['body'][_0x1e696a(0x19e)]||[]);return null;})['then'](respondWithResult(_0x7df44b,null))['catch'](handleError(_0x7df44b,null));};