Built motion from commit 459747fdfe53bbf13fbede61eeaffea1f1438f86. Version 3.0.0...
[motion-next.git] / server / api / jscriptySessionReport / jscriptySessionReport.controller.js
index 515c02f..0119e2b 100644 (file)
@@ -1 +1 @@
-const a386_0x2238=['getQuestions','type','api','error','findAll','query','destroy','key','body','undefined','limit','create','fields','rawAttributes','pick','then','count','sendStatus','Content-Range','describe','where','includeAll','name','merge','JscriptySessionReport','SessionId','order','json','include','map','findOne','fieldName','../../components/parsers/qs','intersection','JscriptyQuestionReport','update','catch','filters','stack','show','rows','filter','params','lodash','nolimit','sequelize','options','offset','keys','attributes','send','model','../../mysqldb','../../config/logger','sort','status','length','like'];(function(_0x14d815,_0x2238b5){const _0x3d71c7=function(_0x446224){while(--_0x446224){_0x14d815['push'](_0x14d815['shift']());}};_0x3d71c7(++_0x2238b5);}(a386_0x2238,0x6e));const a386_0x3d71=function(_0x14d815,_0x2238b5){_0x14d815=_0x14d815-0x0;let _0x3d71c7=a386_0x2238[_0x14d815];return _0x3d71c7;};const _0x3ea0db=a386_0x3d71;'use strict';const _=require(_0x3ea0db('0x31')),qs=require(_0x3ea0db('0x26')),logger=require(_0x3ea0db('0x1'))(_0x3ea0db('0x8')),db=require(_0x3ea0db('0x0'))['db'],{Op}=require(_0x3ea0db('0x33'));function respondWithResult(_0x446224,_0x95a357){return _0x95a357=_0x95a357||0xc8,function(_0x41e911){const _0x24662d=a386_0x3d71;if(_0x41e911)return _0x446224['status'](_0x95a357)[_0x24662d('0x21')](_0x41e911);};}function respondWithFilteredResult(_0x5797fe,_0x1c52ff){return function(_0x6f74d0){const _0x5b2989=a386_0x3d71;if(_0x6f74d0){const _0x2388bb=_0x6f74d0[_0x5b2989('0x16')],_0x3555e2=_0x1c52ff[_0x5b2989('0x35')];let _0x38b7df=_0x1c52ff[_0x5b2989('0x35')]+_0x1c52ff[_0x5b2989('0x10')],_0x1cc325;return _0x38b7df>=_0x2388bb?(_0x38b7df=_0x2388bb,_0x1cc325=0xc8):_0x1cc325=0xce,_0x5797fe[_0x5b2989('0x3')](_0x1cc325),_0x5797fe['set'](_0x5b2989('0x18'),_0x3555e2+'-'+_0x38b7df+'/'+_0x2388bb)[_0x5b2989('0x21')](_0x6f74d0);}return null;};}function saveUpdates(_0x1d6201){return function(_0x5f42da){const _0x587048=a386_0x3d71;if(_0x5f42da)return _0x5f42da['update'](_0x1d6201)[_0x587048('0x15')](function(_0x133afe){return _0x133afe;});return null;};}function removeEntity(_0xbc116d){return function(_0xcd4e8){const _0x334eb5=a386_0x3d71;if(_0xcd4e8)return _0xcd4e8['destroy']()[_0x334eb5('0x15')](function(){const _0x1e89fe=_0x334eb5;_0xbc116d[_0x1e89fe('0x3')](0xcc)['end']();});};}function handleEntityNotFound(_0x4948ef){return function(_0x40a700){const _0x37b3f5=a386_0x3d71;return!_0x40a700&&_0x4948ef[_0x37b3f5('0x17')](0x194),_0x40a700;};}function handleError(_0xbd4a,_0x1950e5){return _0x1950e5=_0x1950e5||0x1f4,function(_0x103f8a){const _0x53563d=a386_0x3d71;logger[_0x53563d('0x9')](_0x103f8a[_0x53563d('0x2c')]),_0x103f8a[_0x53563d('0x1c')]&&delete _0x103f8a['name'],_0xbd4a[_0x53563d('0x3')](_0x1950e5)[_0x53563d('0x38')](_0x103f8a);};}exports['index']=function(_0x454ba7,_0x1457e2){const _0x4bc458=_0x3ea0db;let _0x5f2944={};const _0x52551e={},_0x414567={'count':0x0,'rows':[]},_0x3e59ba=_['map'](db[_0x4bc458('0x1e')]['rawAttributes'],function(_0x21c5a2){const _0x1f34f3=_0x4bc458;return{'name':_0x21c5a2[_0x1f34f3('0x25')],'type':_0x21c5a2[_0x1f34f3('0x7')][_0x1f34f3('0xd')]};});_0x52551e[_0x4bc458('0x39')]=_['map'](_0x3e59ba,'name'),_0x52551e[_0x4bc458('0xb')]=_[_0x4bc458('0x36')](_0x454ba7[_0x4bc458('0xb')]),_0x52551e[_0x4bc458('0x2b')]=_[_0x4bc458('0x27')](_0x52551e[_0x4bc458('0x39')],_0x52551e['query']),_0x5f2944[_0x4bc458('0x37')]=_[_0x4bc458('0x27')](_0x52551e[_0x4bc458('0x39')],qs['fields'](_0x454ba7[_0x4bc458('0xb')][_0x4bc458('0x12')])),_0x5f2944[_0x4bc458('0x37')]=_0x5f2944[_0x4bc458('0x37')]['length']?_0x5f2944['attributes']:_0x52551e[_0x4bc458('0x39')];typeof _0x454ba7[_0x4bc458('0xb')][_0x4bc458('0x32')]===_0x4bc458('0xf')&&(_0x5f2944[_0x4bc458('0x10')]=qs['limit'](_0x454ba7[_0x4bc458('0xb')][_0x4bc458('0x10')]),_0x5f2944[_0x4bc458('0x35')]=qs[_0x4bc458('0x35')](_0x454ba7[_0x4bc458('0xb')]['offset']));_0x5f2944[_0x4bc458('0x20')]=qs['sort'](_0x454ba7[_0x4bc458('0xb')][_0x4bc458('0x2')]),_0x5f2944['where']=qs[_0x4bc458('0x2b')](_[_0x4bc458('0x14')](_0x454ba7[_0x4bc458('0xb')],_0x52551e['filters']),_0x3e59ba);_0x454ba7['query'][_0x4bc458('0x2f')]&&(_0x5f2944[_0x4bc458('0x1a')]=_[_0x4bc458('0x1d')](_0x5f2944['where'],{[Op['or']]:_[_0x4bc458('0x23')](_0x3e59ba,function(_0x30bb1d){const _0x2b8e8c=_0x4bc458;if(_0x30bb1d[_0x2b8e8c('0x7')]!=='VIRTUAL'){const _0x794cd7={};return _0x794cd7[_0x30bb1d[_0x2b8e8c('0x1c')]]={[Op[_0x2b8e8c('0x5')]]:'%'+_0x454ba7['query'][_0x2b8e8c('0x2f')]+'%'},_0x794cd7;}})}));_0x5f2944=_[_0x4bc458('0x1d')]({},_0x5f2944,_0x454ba7['options']);const _0x4607bd={'where':_0x5f2944[_0x4bc458('0x1a')]};return db[_0x4bc458('0x1e')][_0x4bc458('0x16')](_0x4607bd)[_0x4bc458('0x15')](function(_0x12fc49){const _0xd0c8b2=_0x4bc458;return _0x414567[_0xd0c8b2('0x16')]=_0x12fc49,_0x454ba7['query'][_0xd0c8b2('0x1b')]&&(_0x5f2944['include']=[{'all':!![]}]),db['JscriptySessionReport'][_0xd0c8b2('0xa')](_0x5f2944);})[_0x4bc458('0x15')](function(_0x8741b2){return _0x414567['rows']=_0x8741b2,_0x414567;})[_0x4bc458('0x15')](respondWithFilteredResult(_0x1457e2,_0x5f2944))['catch'](handleError(_0x1457e2,null));},exports[_0x3ea0db('0x2d')]=function(_0x289506,_0x3e31c1){const _0x4cc098=_0x3ea0db;let _0x5af63b={'raw':!![],'where':{'id':_0x289506[_0x4cc098('0x30')]['id']}};const _0x43cf19={};return _0x43cf19['model']=_[_0x4cc098('0x36')](db[_0x4cc098('0x1e')]['rawAttributes']),_0x43cf19[_0x4cc098('0xb')]=_['keys'](_0x289506['query']),_0x43cf19[_0x4cc098('0x2b')]=_[_0x4cc098('0x27')](_0x43cf19[_0x4cc098('0x39')],_0x43cf19[_0x4cc098('0xb')]),_0x5af63b[_0x4cc098('0x37')]=_['intersection'](_0x43cf19[_0x4cc098('0x39')],qs['fields'](_0x289506['query'][_0x4cc098('0x12')])),_0x5af63b[_0x4cc098('0x37')]=_0x5af63b[_0x4cc098('0x37')]['length']?_0x5af63b[_0x4cc098('0x37')]:_0x43cf19['model'],_0x289506[_0x4cc098('0xb')][_0x4cc098('0x1b')]&&(_0x5af63b['include']=[{'all':!![]}]),_0x5af63b=_[_0x4cc098('0x1d')]({},_0x5af63b,_0x289506[_0x4cc098('0x34')]),db[_0x4cc098('0x1e')]['findOne'](_0x5af63b)[_0x4cc098('0x15')](handleEntityNotFound(_0x3e31c1,null))[_0x4cc098('0x15')](respondWithResult(_0x3e31c1,null))[_0x4cc098('0x2a')](handleError(_0x3e31c1,null));},exports[_0x3ea0db('0x11')]=function(_0x1558cb,_0x19cdd0){const _0x5a18e7=_0x3ea0db;return db[_0x5a18e7('0x1e')][_0x5a18e7('0x11')](_0x1558cb[_0x5a18e7('0xe')],{})[_0x5a18e7('0x15')](respondWithResult(_0x19cdd0,0xc9))['catch'](handleError(_0x19cdd0,null));},exports[_0x3ea0db('0x29')]=function(_0x1e7b0f,_0x32d655){const _0x2e1581=_0x3ea0db;return _0x1e7b0f[_0x2e1581('0xe')]['id']&&delete _0x1e7b0f[_0x2e1581('0xe')]['id'],db[_0x2e1581('0x1e')][_0x2e1581('0x24')]({'where':{'id':_0x1e7b0f['params']['id']}})[_0x2e1581('0x15')](handleEntityNotFound(_0x32d655,null))[_0x2e1581('0x15')](saveUpdates(_0x1e7b0f[_0x2e1581('0xe')],null))[_0x2e1581('0x15')](respondWithResult(_0x32d655,null))[_0x2e1581('0x2a')](handleError(_0x32d655,null));},exports[_0x3ea0db('0xc')]=function(_0x1f7b05,_0x26c1f9){const _0x927e0=_0x3ea0db;return db[_0x927e0('0x1e')]['findOne']({'where':{'id':_0x1f7b05[_0x927e0('0x30')]['id']}})['then'](handleEntityNotFound(_0x26c1f9,null))[_0x927e0('0x15')](removeEntity(_0x26c1f9,null))['catch'](handleError(_0x26c1f9,null));},exports[_0x3ea0db('0x19')]=function(_0x1a6376,_0x2fa022){const _0x43a2d1=_0x3ea0db;return db[_0x43a2d1('0x1e')][_0x43a2d1('0x19')]()['then'](respondWithResult(_0x2fa022,null))[_0x43a2d1('0x2a')](handleError(_0x2fa022,null));},exports[_0x3ea0db('0x6')]=function(_0x4fdc7b,_0x2929ce){const _0x365558=_0x3ea0db;let _0x3d14cb={'raw':!![],'where':{}};const _0x295011={},_0x38f9c6={'count':0x0,'rows':[]};return db[_0x365558('0x1e')][_0x365558('0x24')]({'where':{'id':_0x4fdc7b[_0x365558('0x30')]['id']}})['then'](handleEntityNotFound(_0x2929ce,null))[_0x365558('0x15')](function(_0x2e2c61){const _0x4bdf2c=_0x365558;if(_0x2e2c61)return _0x295011['model']=_[_0x4bdf2c('0x36')](db[_0x4bdf2c('0x28')][_0x4bdf2c('0x13')]),_0x295011[_0x4bdf2c('0xb')]=_[_0x4bdf2c('0x36')](_0x4fdc7b[_0x4bdf2c('0xb')]),_0x295011[_0x4bdf2c('0x2b')]=_[_0x4bdf2c('0x27')](_0x295011['model'],_0x295011[_0x4bdf2c('0xb')]),_0x3d14cb['attributes']=_[_0x4bdf2c('0x27')](_0x295011[_0x4bdf2c('0x39')],qs[_0x4bdf2c('0x12')](_0x4fdc7b['query'][_0x4bdf2c('0x12')])),_0x3d14cb[_0x4bdf2c('0x37')]=_0x3d14cb['attributes'][_0x4bdf2c('0x4')]?_0x3d14cb[_0x4bdf2c('0x37')]:_0x295011[_0x4bdf2c('0x39')],typeof _0x4fdc7b[_0x4bdf2c('0xb')][_0x4bdf2c('0x32')]===_0x4bdf2c('0xf')&&(_0x3d14cb['limit']=qs[_0x4bdf2c('0x10')](_0x4fdc7b[_0x4bdf2c('0xb')]['limit']),_0x3d14cb['offset']=qs[_0x4bdf2c('0x35')](_0x4fdc7b[_0x4bdf2c('0xb')][_0x4bdf2c('0x35')])),_0x3d14cb[_0x4bdf2c('0x20')]=qs[_0x4bdf2c('0x2')](_0x4fdc7b['query'][_0x4bdf2c('0x2')]),_0x3d14cb['where']=qs[_0x4bdf2c('0x2b')](_[_0x4bdf2c('0x14')](_0x4fdc7b[_0x4bdf2c('0xb')],_0x295011['filters'])),_0x3d14cb[_0x4bdf2c('0x1a')][_0x4bdf2c('0x1f')]=_0x2e2c61['id'],_0x4fdc7b[_0x4bdf2c('0xb')][_0x4bdf2c('0x2f')]&&(_0x3d14cb[_0x4bdf2c('0x1a')]=_[_0x4bdf2c('0x1d')](_0x3d14cb[_0x4bdf2c('0x1a')],{[Op['or']]:_[_0x4bdf2c('0x23')](_0x3d14cb[_0x4bdf2c('0x37')],function(_0x50ac0c){const _0x120d33=_0x4bdf2c,_0x470057={};return _0x470057[_0x50ac0c]={[Op[_0x120d33('0x5')]]:'%'+_0x4fdc7b[_0x120d33('0xb')][_0x120d33('0x2f')]+'%'},_0x470057;})})),_0x3d14cb=_[_0x4bdf2c('0x1d')]({},_0x3d14cb,_0x4fdc7b[_0x4bdf2c('0x34')]),db[_0x4bdf2c('0x28')][_0x4bdf2c('0x16')]({'where':_0x3d14cb['where']})[_0x4bdf2c('0x15')](function(_0x87c405){const _0x2a1795=_0x4bdf2c;return _0x38f9c6[_0x2a1795('0x16')]=_0x87c405,_0x4fdc7b[_0x2a1795('0xb')]['includeAll']&&(_0x3d14cb[_0x2a1795('0x22')]=[{'all':!![]}]),db['JscriptyQuestionReport']['findAll'](_0x3d14cb);})[_0x4bdf2c('0x15')](function(_0x286a01){const _0x5a3742=_0x4bdf2c;return _0x38f9c6[_0x5a3742('0x2e')]=_0x286a01,_0x38f9c6;});})[_0x365558('0x15')](respondWithFilteredResult(_0x2929ce,_0x3d14cb))[_0x365558('0x2a')](handleError(_0x2929ce,null));};
\ No newline at end of file
+const a386_0x17a0=['like','nolimit','includeAll','show','VIRTUAL','rawAttributes','lodash','limit','order','index','body','sendStatus','then','undefined','fieldName','count','set','JscriptyQuestionReport','fields','query','model','attributes','keys','catch','api','filter','stack','../../mysqldb','where','../../components/parsers/qs','merge','sequelize','update','../../config/logger','error','rows','sort','destroy','json','getQuestions','map','name','describe','options','length','offset','type','create','JscriptySessionReport','pick','intersection','findAll','params','findOne','end','include','SessionId','filters','status'];(function(_0x2f9149,_0x17a000){const _0x185fcd=function(_0x45326e){while(--_0x45326e){_0x2f9149['push'](_0x2f9149['shift']());}};_0x185fcd(++_0x17a000);}(a386_0x17a0,0x1e0));const a386_0x185f=function(_0x2f9149,_0x17a000){_0x2f9149=_0x2f9149-0x0;let _0x185fcd=a386_0x17a0[_0x2f9149];return _0x185fcd;};const _0x2a8fa0=a386_0x185f;'use strict';const _=require(_0x2a8fa0('0x39')),qs=require(_0x2a8fa0('0x15')),logger=require(_0x2a8fa0('0x19'))(_0x2a8fa0('0x10')),db=require(_0x2a8fa0('0x13'))['db'],{Op}=require(_0x2a8fa0('0x17'));function respondWithResult(_0x45326e,_0x2cd2a6){return _0x2cd2a6=_0x2cd2a6||0xc8,function(_0x34197e){const _0x168e6b=a386_0x185f;if(_0x34197e)return _0x45326e[_0x168e6b('0x32')](_0x2cd2a6)[_0x168e6b('0x1e')](_0x34197e);};}function respondWithFilteredResult(_0x14ffa9,_0x349a53){return function(_0x374aa3){const _0x2c8a65=a386_0x185f;if(_0x374aa3){const _0x38a49d=_0x374aa3[_0x2c8a65('0x7')],_0x4dc9e7=_0x349a53[_0x2c8a65('0x25')];let _0x28fd4c=_0x349a53[_0x2c8a65('0x25')]+_0x349a53['limit'],_0x454388;return _0x28fd4c>=_0x38a49d?(_0x28fd4c=_0x38a49d,_0x454388=0xc8):_0x454388=0xce,_0x14ffa9['status'](_0x454388),_0x14ffa9[_0x2c8a65('0x8')]('Content-Range',_0x4dc9e7+'-'+_0x28fd4c+'/'+_0x38a49d)['json'](_0x374aa3);}return null;};}function saveUpdates(_0x5aa1ae){return function(_0x48ca17){const _0x1652cc=a386_0x185f;if(_0x48ca17)return _0x48ca17[_0x1652cc('0x18')](_0x5aa1ae)['then'](function(_0x4f7a3c){return _0x4f7a3c;});return null;};}function removeEntity(_0x50b347){return function(_0x35d463){const _0x17d7d6=a386_0x185f;if(_0x35d463)return _0x35d463[_0x17d7d6('0x1d')]()[_0x17d7d6('0x4')](function(){const _0x596485=_0x17d7d6;_0x50b347[_0x596485('0x32')](0xcc)[_0x596485('0x2e')]();});};}function handleEntityNotFound(_0x499a82){return function(_0x212e8c){const _0x3d2323=a386_0x185f;return!_0x212e8c&&_0x499a82[_0x3d2323('0x3')](0x194),_0x212e8c;};}function handleError(_0x1bf14f,_0x1e30d9){return _0x1e30d9=_0x1e30d9||0x1f4,function(_0x4c97e9){const _0x31e62d=a386_0x185f;logger[_0x31e62d('0x1a')](_0x4c97e9[_0x31e62d('0x12')]),_0x4c97e9[_0x31e62d('0x21')]&&delete _0x4c97e9[_0x31e62d('0x21')],_0x1bf14f['status'](_0x1e30d9)['send'](_0x4c97e9);};}exports[_0x2a8fa0('0x1')]=function(_0x1cfaec,_0xc8c902){const _0x453e66=_0x2a8fa0;let _0x5a742f={};const _0x2c46ed={},_0x3a1c9b={'count':0x0,'rows':[]},_0x54b832=_[_0x453e66('0x20')](db[_0x453e66('0x28')][_0x453e66('0x38')],function(_0x292311){const _0x2be96d=_0x453e66;return{'name':_0x292311[_0x2be96d('0x6')],'type':_0x292311[_0x2be96d('0x26')]['key']};});_0x2c46ed[_0x453e66('0xc')]=_[_0x453e66('0x20')](_0x54b832,_0x453e66('0x21')),_0x2c46ed['query']=_['keys'](_0x1cfaec[_0x453e66('0xb')]),_0x2c46ed[_0x453e66('0x31')]=_[_0x453e66('0x2a')](_0x2c46ed[_0x453e66('0xc')],_0x2c46ed[_0x453e66('0xb')]),_0x5a742f[_0x453e66('0xd')]=_[_0x453e66('0x2a')](_0x2c46ed[_0x453e66('0xc')],qs[_0x453e66('0xa')](_0x1cfaec[_0x453e66('0xb')][_0x453e66('0xa')])),_0x5a742f[_0x453e66('0xd')]=_0x5a742f[_0x453e66('0xd')][_0x453e66('0x24')]?_0x5a742f[_0x453e66('0xd')]:_0x2c46ed[_0x453e66('0xc')];typeof _0x1cfaec[_0x453e66('0xb')][_0x453e66('0x34')]===_0x453e66('0x5')&&(_0x5a742f[_0x453e66('0x3a')]=qs[_0x453e66('0x3a')](_0x1cfaec[_0x453e66('0xb')]['limit']),_0x5a742f['offset']=qs[_0x453e66('0x25')](_0x1cfaec[_0x453e66('0xb')]['offset']));_0x5a742f[_0x453e66('0x0')]=qs['sort'](_0x1cfaec[_0x453e66('0xb')]['sort']),_0x5a742f[_0x453e66('0x14')]=qs[_0x453e66('0x31')](_[_0x453e66('0x29')](_0x1cfaec[_0x453e66('0xb')],_0x2c46ed[_0x453e66('0x31')]),_0x54b832);_0x1cfaec[_0x453e66('0xb')][_0x453e66('0x11')]&&(_0x5a742f[_0x453e66('0x14')]=_[_0x453e66('0x16')](_0x5a742f[_0x453e66('0x14')],{[Op['or']]:_[_0x453e66('0x20')](_0x54b832,function(_0x2eccb7){const _0x3237a6=_0x453e66;if(_0x2eccb7[_0x3237a6('0x26')]!==_0x3237a6('0x37')){const _0x2a7c35={};return _0x2a7c35[_0x2eccb7[_0x3237a6('0x21')]]={[Op[_0x3237a6('0x33')]]:'%'+_0x1cfaec[_0x3237a6('0xb')][_0x3237a6('0x11')]+'%'},_0x2a7c35;}})}));_0x5a742f=_[_0x453e66('0x16')]({},_0x5a742f,_0x1cfaec[_0x453e66('0x23')]);const _0x46d296={'where':_0x5a742f[_0x453e66('0x14')]};return db[_0x453e66('0x28')][_0x453e66('0x7')](_0x46d296)[_0x453e66('0x4')](function(_0xaf0004){const _0x481cf0=_0x453e66;return _0x3a1c9b['count']=_0xaf0004,_0x1cfaec['query'][_0x481cf0('0x35')]&&(_0x5a742f['include']=[{'all':!![]}]),db[_0x481cf0('0x28')]['findAll'](_0x5a742f);})['then'](function(_0x4da379){const _0x46aad4=_0x453e66;return _0x3a1c9b[_0x46aad4('0x1b')]=_0x4da379,_0x3a1c9b;})[_0x453e66('0x4')](respondWithFilteredResult(_0xc8c902,_0x5a742f))[_0x453e66('0xf')](handleError(_0xc8c902,null));},exports[_0x2a8fa0('0x36')]=function(_0x1e38c0,_0x20345e){const _0x1e09b4=_0x2a8fa0;let _0x524731={'raw':!![],'where':{'id':_0x1e38c0[_0x1e09b4('0x2c')]['id']}};const _0x598ebc={};return _0x598ebc[_0x1e09b4('0xc')]=_[_0x1e09b4('0xe')](db['JscriptySessionReport'][_0x1e09b4('0x38')]),_0x598ebc[_0x1e09b4('0xb')]=_['keys'](_0x1e38c0[_0x1e09b4('0xb')]),_0x598ebc['filters']=_[_0x1e09b4('0x2a')](_0x598ebc[_0x1e09b4('0xc')],_0x598ebc['query']),_0x524731[_0x1e09b4('0xd')]=_[_0x1e09b4('0x2a')](_0x598ebc['model'],qs[_0x1e09b4('0xa')](_0x1e38c0['query'][_0x1e09b4('0xa')])),_0x524731['attributes']=_0x524731[_0x1e09b4('0xd')][_0x1e09b4('0x24')]?_0x524731['attributes']:_0x598ebc['model'],_0x1e38c0[_0x1e09b4('0xb')][_0x1e09b4('0x35')]&&(_0x524731[_0x1e09b4('0x2f')]=[{'all':!![]}]),_0x524731=_[_0x1e09b4('0x16')]({},_0x524731,_0x1e38c0[_0x1e09b4('0x23')]),db[_0x1e09b4('0x28')][_0x1e09b4('0x2d')](_0x524731)[_0x1e09b4('0x4')](handleEntityNotFound(_0x20345e,null))[_0x1e09b4('0x4')](respondWithResult(_0x20345e,null))[_0x1e09b4('0xf')](handleError(_0x20345e,null));},exports['create']=function(_0xe022cd,_0x1de5de){const _0x54d67b=_0x2a8fa0;return db[_0x54d67b('0x28')][_0x54d67b('0x27')](_0xe022cd['body'],{})['then'](respondWithResult(_0x1de5de,0xc9))[_0x54d67b('0xf')](handleError(_0x1de5de,null));},exports[_0x2a8fa0('0x18')]=function(_0x64636b,_0x33af0e){const _0x3bfc1c=_0x2a8fa0;return _0x64636b[_0x3bfc1c('0x2')]['id']&&delete _0x64636b[_0x3bfc1c('0x2')]['id'],db[_0x3bfc1c('0x28')][_0x3bfc1c('0x2d')]({'where':{'id':_0x64636b[_0x3bfc1c('0x2c')]['id']}})[_0x3bfc1c('0x4')](handleEntityNotFound(_0x33af0e,null))[_0x3bfc1c('0x4')](saveUpdates(_0x64636b[_0x3bfc1c('0x2')],null))[_0x3bfc1c('0x4')](respondWithResult(_0x33af0e,null))['catch'](handleError(_0x33af0e,null));},exports[_0x2a8fa0('0x1d')]=function(_0x490721,_0x108564){const _0x1c7af3=_0x2a8fa0;return db[_0x1c7af3('0x28')][_0x1c7af3('0x2d')]({'where':{'id':_0x490721[_0x1c7af3('0x2c')]['id']}})[_0x1c7af3('0x4')](handleEntityNotFound(_0x108564,null))[_0x1c7af3('0x4')](removeEntity(_0x108564,null))[_0x1c7af3('0xf')](handleError(_0x108564,null));},exports[_0x2a8fa0('0x22')]=function(_0xef45e2,_0xff37fe){const _0x4fd5fe=_0x2a8fa0;return db[_0x4fd5fe('0x28')][_0x4fd5fe('0x22')]()[_0x4fd5fe('0x4')](respondWithResult(_0xff37fe,null))['catch'](handleError(_0xff37fe,null));},exports[_0x2a8fa0('0x1f')]=function(_0x5c6264,_0x461d81){const _0x38f1db=_0x2a8fa0;let _0x51f317={'raw':!![],'where':{}};const _0x5c7c87={},_0x11ebfa={'count':0x0,'rows':[]};return db[_0x38f1db('0x28')][_0x38f1db('0x2d')]({'where':{'id':_0x5c6264[_0x38f1db('0x2c')]['id']}})[_0x38f1db('0x4')](handleEntityNotFound(_0x461d81,null))[_0x38f1db('0x4')](function(_0x13d75a){const _0x526563=_0x38f1db;if(_0x13d75a)return _0x5c7c87['model']=_[_0x526563('0xe')](db[_0x526563('0x9')]['rawAttributes']),_0x5c7c87[_0x526563('0xb')]=_[_0x526563('0xe')](_0x5c6264[_0x526563('0xb')]),_0x5c7c87[_0x526563('0x31')]=_[_0x526563('0x2a')](_0x5c7c87[_0x526563('0xc')],_0x5c7c87[_0x526563('0xb')]),_0x51f317['attributes']=_[_0x526563('0x2a')](_0x5c7c87[_0x526563('0xc')],qs['fields'](_0x5c6264['query']['fields'])),_0x51f317['attributes']=_0x51f317[_0x526563('0xd')][_0x526563('0x24')]?_0x51f317[_0x526563('0xd')]:_0x5c7c87[_0x526563('0xc')],typeof _0x5c6264['query'][_0x526563('0x34')]===_0x526563('0x5')&&(_0x51f317[_0x526563('0x3a')]=qs[_0x526563('0x3a')](_0x5c6264[_0x526563('0xb')][_0x526563('0x3a')]),_0x51f317[_0x526563('0x25')]=qs['offset'](_0x5c6264[_0x526563('0xb')][_0x526563('0x25')])),_0x51f317['order']=qs[_0x526563('0x1c')](_0x5c6264[_0x526563('0xb')]['sort']),_0x51f317[_0x526563('0x14')]=qs[_0x526563('0x31')](_[_0x526563('0x29')](_0x5c6264[_0x526563('0xb')],_0x5c7c87[_0x526563('0x31')])),_0x51f317[_0x526563('0x14')][_0x526563('0x30')]=_0x13d75a['id'],_0x5c6264['query']['filter']&&(_0x51f317[_0x526563('0x14')]=_[_0x526563('0x16')](_0x51f317[_0x526563('0x14')],{[Op['or']]:_['map'](_0x51f317[_0x526563('0xd')],function(_0x59d238){const _0x2c8fdd=_0x526563,_0x270558={};return _0x270558[_0x59d238]={[Op[_0x2c8fdd('0x33')]]:'%'+_0x5c6264[_0x2c8fdd('0xb')][_0x2c8fdd('0x11')]+'%'},_0x270558;})})),_0x51f317=_[_0x526563('0x16')]({},_0x51f317,_0x5c6264['options']),db[_0x526563('0x9')][_0x526563('0x7')]({'where':_0x51f317[_0x526563('0x14')]})['then'](function(_0x13bf43){const _0x4a8a4e=_0x526563;return _0x11ebfa[_0x4a8a4e('0x7')]=_0x13bf43,_0x5c6264[_0x4a8a4e('0xb')]['includeAll']&&(_0x51f317['include']=[{'all':!![]}]),db['JscriptyQuestionReport'][_0x4a8a4e('0x2b')](_0x51f317);})[_0x526563('0x4')](function(_0x5ecf94){return _0x11ebfa['rows']=_0x5ecf94,_0x11ebfa;});})[_0x38f1db('0x4')](respondWithFilteredResult(_0x461d81,_0x51f317))['catch'](handleError(_0x461d81,null));};
\ No newline at end of file