Built motion from commit f651e4b0a7312c0adceb5e57d6684a801a3aaf0d. Version 3.0.0...
[motion-next.git] / server / api / jscriptySessionReport / jscriptySessionReport.controller.js
index dac8c10..344b4af 100644 (file)
@@ -1 +1 @@
-const a386_0xb471=['set','rawAttributes','limit','keys','undefined','VIRTUAL','pick','catch','map','findOne','like','order','error','includeAll','where','stack','count','query','create','sendStatus','json','api','show','then','offset','sort','rows','status','../../components/parsers/qs','merge','describe','include','intersection','../../mysqldb','filters','lodash','JscriptyQuestionReport','SessionId','getQuestions','destroy','key','options','end','update','JscriptySessionReport','body','attributes','length','filter','name','fieldName','fields','model','params','type','../../config/logger'];(function(_0x59ff7f,_0xb471aa){const _0x37795f=function(_0x1be118){while(--_0x1be118){_0x59ff7f['push'](_0x59ff7f['shift']());}};_0x37795f(++_0xb471aa);}(a386_0xb471,0x7a));const a386_0x3779=function(_0x59ff7f,_0xb471aa){_0x59ff7f=_0x59ff7f-0x0;let _0x37795f=a386_0xb471[_0x59ff7f];return _0x37795f;};const _0x119e59=a386_0x3779;'use strict';const _=require(_0x119e59('0x19')),qs=require(_0x119e59('0x12')),logger=require(_0x119e59('0x2d'))(_0x119e59('0xb')),db=require(_0x119e59('0x17'))['db'],{Op}=require('sequelize');function respondWithResult(_0x1be118,_0x5f4156){return _0x5f4156=_0x5f4156||0xc8,function(_0x1eceb5){const _0x4cd39e=a386_0x3779;if(_0x1eceb5)return _0x1be118[_0x4cd39e('0x11')](_0x5f4156)[_0x4cd39e('0xa')](_0x1eceb5);};}function respondWithFilteredResult(_0x5b7f65,_0x4a724f){return function(_0xaff360){const _0x480314=a386_0x3779;if(_0xaff360){const _0x1203fa=_0xaff360[_0x480314('0x6')],_0x2be0c2=_0x4a724f['offset'];let _0x333083=_0x4a724f[_0x480314('0xe')]+_0x4a724f[_0x480314('0x30')],_0x2097a3;return _0x333083>=_0x1203fa?(_0x333083=_0x1203fa,_0x2097a3=0xc8):_0x2097a3=0xce,_0x5b7f65['status'](_0x2097a3),_0x5b7f65[_0x480314('0x2e')]('Content-Range',_0x2be0c2+'-'+_0x333083+'/'+_0x1203fa)[_0x480314('0xa')](_0xaff360);}return null;};}function saveUpdates(_0x46347e){return function(_0x9b4dd3){const _0x26e6e9=a386_0x3779;if(_0x9b4dd3)return _0x9b4dd3[_0x26e6e9('0x21')](_0x46347e)['then'](function(_0x2bf7bb){return _0x2bf7bb;});return null;};}function removeEntity(_0xd33260){return function(_0x307b5c){const _0x2cc3eb=a386_0x3779;if(_0x307b5c)return _0x307b5c[_0x2cc3eb('0x1d')]()['then'](function(){const _0x20e6af=_0x2cc3eb;_0xd33260[_0x20e6af('0x11')](0xcc)[_0x20e6af('0x20')]();});};}function handleEntityNotFound(_0x19bdbc){return function(_0x5d9e01){const _0x5f36cb=a386_0x3779;return!_0x5d9e01&&_0x19bdbc[_0x5f36cb('0x9')](0x194),_0x5d9e01;};}function handleError(_0x5cc9a3,_0x1d3b26){return _0x1d3b26=_0x1d3b26||0x1f4,function(_0xc43974){const _0x146e89=a386_0x3779;logger[_0x146e89('0x2')](_0xc43974[_0x146e89('0x5')]),_0xc43974[_0x146e89('0x27')]&&delete _0xc43974[_0x146e89('0x27')],_0x5cc9a3[_0x146e89('0x11')](_0x1d3b26)['send'](_0xc43974);};}exports['index']=function(_0x1020a0,_0x538ed3){const _0x28df1d=_0x119e59;let _0x48f0cc={};const _0x1462c1={},_0x4dd974={'count':0x0,'rows':[]},_0x4454d1=_[_0x28df1d('0x36')](db[_0x28df1d('0x22')][_0x28df1d('0x2f')],function(_0x25e62e){const _0x1386a6=_0x28df1d;return{'name':_0x25e62e[_0x1386a6('0x28')],'type':_0x25e62e[_0x1386a6('0x2c')][_0x1386a6('0x1e')]};});_0x1462c1[_0x28df1d('0x2a')]=_[_0x28df1d('0x36')](_0x4454d1,'name'),_0x1462c1[_0x28df1d('0x7')]=_[_0x28df1d('0x31')](_0x1020a0['query']),_0x1462c1[_0x28df1d('0x18')]=_[_0x28df1d('0x16')](_0x1462c1[_0x28df1d('0x2a')],_0x1462c1[_0x28df1d('0x7')]),_0x48f0cc[_0x28df1d('0x24')]=_['intersection'](_0x1462c1['model'],qs[_0x28df1d('0x29')](_0x1020a0[_0x28df1d('0x7')][_0x28df1d('0x29')])),_0x48f0cc['attributes']=_0x48f0cc['attributes'][_0x28df1d('0x25')]?_0x48f0cc[_0x28df1d('0x24')]:_0x1462c1[_0x28df1d('0x2a')];typeof _0x1020a0[_0x28df1d('0x7')]['nolimit']===_0x28df1d('0x32')&&(_0x48f0cc[_0x28df1d('0x30')]=qs['limit'](_0x1020a0[_0x28df1d('0x7')][_0x28df1d('0x30')]),_0x48f0cc[_0x28df1d('0xe')]=qs[_0x28df1d('0xe')](_0x1020a0[_0x28df1d('0x7')][_0x28df1d('0xe')]));_0x48f0cc[_0x28df1d('0x1')]=qs['sort'](_0x1020a0[_0x28df1d('0x7')]['sort']),_0x48f0cc['where']=qs['filters'](_[_0x28df1d('0x34')](_0x1020a0[_0x28df1d('0x7')],_0x1462c1['filters']),_0x4454d1);_0x1020a0[_0x28df1d('0x7')][_0x28df1d('0x26')]&&(_0x48f0cc[_0x28df1d('0x4')]=_['merge'](_0x48f0cc[_0x28df1d('0x4')],{[Op['or']]:_[_0x28df1d('0x36')](_0x4454d1,function(_0x5ca428){const _0xf7d09f=_0x28df1d;if(_0x5ca428[_0xf7d09f('0x2c')]!==_0xf7d09f('0x33')){const _0x1784b8={};return _0x1784b8[_0x5ca428[_0xf7d09f('0x27')]]={[Op[_0xf7d09f('0x0')]]:'%'+_0x1020a0[_0xf7d09f('0x7')][_0xf7d09f('0x26')]+'%'},_0x1784b8;}})}));_0x48f0cc=_[_0x28df1d('0x13')]({},_0x48f0cc,_0x1020a0[_0x28df1d('0x1f')]);const _0x3f2daf={'where':_0x48f0cc[_0x28df1d('0x4')]};return db[_0x28df1d('0x22')][_0x28df1d('0x6')](_0x3f2daf)[_0x28df1d('0xd')](function(_0x5832a1){const _0x117edd=_0x28df1d;return _0x4dd974[_0x117edd('0x6')]=_0x5832a1,_0x1020a0['query'][_0x117edd('0x3')]&&(_0x48f0cc[_0x117edd('0x15')]=[{'all':!![]}]),db['JscriptySessionReport']['findAll'](_0x48f0cc);})[_0x28df1d('0xd')](function(_0x58c613){const _0x52578e=_0x28df1d;return _0x4dd974[_0x52578e('0x10')]=_0x58c613,_0x4dd974;})[_0x28df1d('0xd')](respondWithFilteredResult(_0x538ed3,_0x48f0cc))[_0x28df1d('0x35')](handleError(_0x538ed3,null));},exports[_0x119e59('0xc')]=function(_0x45fad3,_0xc538b){const _0x4d51c1=_0x119e59;let _0x22a40c={'raw':!![],'where':{'id':_0x45fad3[_0x4d51c1('0x2b')]['id']}};const _0x550815={};return _0x550815[_0x4d51c1('0x2a')]=_[_0x4d51c1('0x31')](db[_0x4d51c1('0x22')]['rawAttributes']),_0x550815[_0x4d51c1('0x7')]=_[_0x4d51c1('0x31')](_0x45fad3['query']),_0x550815['filters']=_['intersection'](_0x550815[_0x4d51c1('0x2a')],_0x550815[_0x4d51c1('0x7')]),_0x22a40c[_0x4d51c1('0x24')]=_[_0x4d51c1('0x16')](_0x550815[_0x4d51c1('0x2a')],qs[_0x4d51c1('0x29')](_0x45fad3['query'][_0x4d51c1('0x29')])),_0x22a40c['attributes']=_0x22a40c['attributes'][_0x4d51c1('0x25')]?_0x22a40c[_0x4d51c1('0x24')]:_0x550815['model'],_0x45fad3['query'][_0x4d51c1('0x3')]&&(_0x22a40c['include']=[{'all':!![]}]),_0x22a40c=_[_0x4d51c1('0x13')]({},_0x22a40c,_0x45fad3['options']),db[_0x4d51c1('0x22')][_0x4d51c1('0x37')](_0x22a40c)[_0x4d51c1('0xd')](handleEntityNotFound(_0xc538b,null))['then'](respondWithResult(_0xc538b,null))['catch'](handleError(_0xc538b,null));},exports[_0x119e59('0x8')]=function(_0x23ba98,_0x5b609f){const _0x16de59=_0x119e59;return db[_0x16de59('0x22')][_0x16de59('0x8')](_0x23ba98['body'],{})['then'](respondWithResult(_0x5b609f,0xc9))[_0x16de59('0x35')](handleError(_0x5b609f,null));},exports[_0x119e59('0x21')]=function(_0x11549e,_0x43b9e0){const _0x129f5d=_0x119e59;return _0x11549e[_0x129f5d('0x23')]['id']&&delete _0x11549e[_0x129f5d('0x23')]['id'],db['JscriptySessionReport'][_0x129f5d('0x37')]({'where':{'id':_0x11549e['params']['id']}})['then'](handleEntityNotFound(_0x43b9e0,null))[_0x129f5d('0xd')](saveUpdates(_0x11549e[_0x129f5d('0x23')],null))[_0x129f5d('0xd')](respondWithResult(_0x43b9e0,null))[_0x129f5d('0x35')](handleError(_0x43b9e0,null));},exports[_0x119e59('0x1d')]=function(_0x1ff129,_0xcd1dfa){const _0x852d99=_0x119e59;return db[_0x852d99('0x22')][_0x852d99('0x37')]({'where':{'id':_0x1ff129['params']['id']}})[_0x852d99('0xd')](handleEntityNotFound(_0xcd1dfa,null))[_0x852d99('0xd')](removeEntity(_0xcd1dfa,null))[_0x852d99('0x35')](handleError(_0xcd1dfa,null));},exports['describe']=function(_0x1427f3,_0x4ecb35){const _0x262707=_0x119e59;return db[_0x262707('0x22')][_0x262707('0x14')]()[_0x262707('0xd')](respondWithResult(_0x4ecb35,null))[_0x262707('0x35')](handleError(_0x4ecb35,null));},exports[_0x119e59('0x1c')]=function(_0x466e42,_0x3422db){const _0x17e31d=_0x119e59;let _0xf69385={'raw':!![],'where':{}};const _0x744555={},_0x286caa={'count':0x0,'rows':[]};return db[_0x17e31d('0x22')][_0x17e31d('0x37')]({'where':{'id':_0x466e42[_0x17e31d('0x2b')]['id']}})[_0x17e31d('0xd')](handleEntityNotFound(_0x3422db,null))[_0x17e31d('0xd')](function(_0x1bfa19){const _0x5ed308=_0x17e31d;if(_0x1bfa19)return _0x744555[_0x5ed308('0x2a')]=_['keys'](db[_0x5ed308('0x1a')]['rawAttributes']),_0x744555[_0x5ed308('0x7')]=_['keys'](_0x466e42[_0x5ed308('0x7')]),_0x744555[_0x5ed308('0x18')]=_[_0x5ed308('0x16')](_0x744555[_0x5ed308('0x2a')],_0x744555[_0x5ed308('0x7')]),_0xf69385[_0x5ed308('0x24')]=_[_0x5ed308('0x16')](_0x744555[_0x5ed308('0x2a')],qs[_0x5ed308('0x29')](_0x466e42[_0x5ed308('0x7')]['fields'])),_0xf69385[_0x5ed308('0x24')]=_0xf69385[_0x5ed308('0x24')][_0x5ed308('0x25')]?_0xf69385['attributes']:_0x744555[_0x5ed308('0x2a')],typeof _0x466e42[_0x5ed308('0x7')]['nolimit']===_0x5ed308('0x32')&&(_0xf69385[_0x5ed308('0x30')]=qs[_0x5ed308('0x30')](_0x466e42['query'][_0x5ed308('0x30')]),_0xf69385[_0x5ed308('0xe')]=qs[_0x5ed308('0xe')](_0x466e42[_0x5ed308('0x7')][_0x5ed308('0xe')])),_0xf69385[_0x5ed308('0x1')]=qs[_0x5ed308('0xf')](_0x466e42[_0x5ed308('0x7')][_0x5ed308('0xf')]),_0xf69385[_0x5ed308('0x4')]=qs['filters'](_['pick'](_0x466e42[_0x5ed308('0x7')],_0x744555[_0x5ed308('0x18')])),_0xf69385['where'][_0x5ed308('0x1b')]=_0x1bfa19['id'],_0x466e42[_0x5ed308('0x7')][_0x5ed308('0x26')]&&(_0xf69385[_0x5ed308('0x4')]=_[_0x5ed308('0x13')](_0xf69385[_0x5ed308('0x4')],{[Op['or']]:_[_0x5ed308('0x36')](_0xf69385[_0x5ed308('0x24')],function(_0xf8009e){const _0x22effd=_0x5ed308,_0x472e5e={};return _0x472e5e[_0xf8009e]={[Op[_0x22effd('0x0')]]:'%'+_0x466e42[_0x22effd('0x7')][_0x22effd('0x26')]+'%'},_0x472e5e;})})),_0xf69385=_['merge']({},_0xf69385,_0x466e42['options']),db['JscriptyQuestionReport'][_0x5ed308('0x6')]({'where':_0xf69385[_0x5ed308('0x4')]})[_0x5ed308('0xd')](function(_0x401d52){const _0x3026ee=_0x5ed308;return _0x286caa[_0x3026ee('0x6')]=_0x401d52,_0x466e42[_0x3026ee('0x7')]['includeAll']&&(_0xf69385[_0x3026ee('0x15')]=[{'all':!![]}]),db[_0x3026ee('0x1a')]['findAll'](_0xf69385);})['then'](function(_0x5924c3){return _0x286caa['rows']=_0x5924c3,_0x286caa;});})[_0x17e31d('0xd')](respondWithFilteredResult(_0x3422db,_0xf69385))[_0x17e31d('0x35')](handleError(_0x3422db,null));};
\ No newline at end of file
+const a386_0x4096=['findOne','fields','set','sort','attributes','key','catch','undefined','merge','name','order','pick','JscriptySessionReport','where','intersection','Content-Range','index','options','filters','keys','fieldName','../../config/logger','describe','findAll','json','include','filter','like','create','type','then','send','sendStatus','count','rows','VIRTUAL','length','stack','body','nolimit','model','SessionId','lodash','status','rawAttributes','params','../../mysqldb','query','show','map','sequelize','destroy','api','JscriptyQuestionReport','includeAll','error','update','../../components/parsers/qs','limit','offset'];(function(_0x378915,_0x40960a){const _0x46cae3=function(_0x46423b){while(--_0x46423b){_0x378915['push'](_0x378915['shift']());}};_0x46cae3(++_0x40960a);}(a386_0x4096,0x135));const a386_0x46ca=function(_0x378915,_0x40960a){_0x378915=_0x378915-0x0;let _0x46cae3=a386_0x4096[_0x378915];return _0x46cae3;};const _0x41d78b=a386_0x46ca;'use strict';const _=require(_0x41d78b('0x21')),qs=require(_0x41d78b('0x30')),logger=require(_0x41d78b('0xc'))(_0x41d78b('0x2b')),db=require(_0x41d78b('0x25'))['db'],{Op}=require(_0x41d78b('0x29'));function respondWithResult(_0x46423b,_0x4431a1){return _0x4431a1=_0x4431a1||0xc8,function(_0x452aed){const _0x3e1313=a386_0x46ca;if(_0x452aed)return _0x46423b[_0x3e1313('0x22')](_0x4431a1)['json'](_0x452aed);};}function respondWithFilteredResult(_0xc4b91b,_0x59d073){return function(_0x37cd48){const _0x1e010d=a386_0x46ca;if(_0x37cd48){const _0x5b4c60=_0x37cd48['count'],_0x35d79d=_0x59d073[_0x1e010d('0x32')];let _0x521f11=_0x59d073[_0x1e010d('0x32')]+_0x59d073[_0x1e010d('0x31')],_0x265320;return _0x521f11>=_0x5b4c60?(_0x521f11=_0x5b4c60,_0x265320=0xc8):_0x265320=0xce,_0xc4b91b[_0x1e010d('0x22')](_0x265320),_0xc4b91b[_0x1e010d('0x35')](_0x1e010d('0x6'),_0x35d79d+'-'+_0x521f11+'/'+_0x5b4c60)[_0x1e010d('0xf')](_0x37cd48);}return null;};}function saveUpdates(_0x12231b){return function(_0x165a31){const _0x2c1c9e=a386_0x46ca;if(_0x165a31)return _0x165a31[_0x2c1c9e('0x2f')](_0x12231b)[_0x2c1c9e('0x15')](function(_0x5c788a){return _0x5c788a;});return null;};}function removeEntity(_0xe419cc){return function(_0x4b6ae5){const _0x297614=a386_0x46ca;if(_0x4b6ae5)return _0x4b6ae5[_0x297614('0x2a')]()['then'](function(){const _0x30657a=_0x297614;_0xe419cc[_0x30657a('0x22')](0xcc)['end']();});};}function handleEntityNotFound(_0x48f6ca){return function(_0x576948){const _0xffb7ba=a386_0x46ca;return!_0x576948&&_0x48f6ca[_0xffb7ba('0x17')](0x194),_0x576948;};}function handleError(_0x2c6cae,_0x21f8d8){return _0x21f8d8=_0x21f8d8||0x1f4,function(_0x588f75){const _0x3aa496=a386_0x46ca;logger[_0x3aa496('0x2e')](_0x588f75[_0x3aa496('0x1c')]),_0x588f75['name']&&delete _0x588f75[_0x3aa496('0x0')],_0x2c6cae['status'](_0x21f8d8)[_0x3aa496('0x16')](_0x588f75);};}exports[_0x41d78b('0x7')]=function(_0x3ca0b9,_0x12412b){const _0x2c71cd=_0x41d78b;let _0x33c8de={};const _0x5747da={},_0x5c9b33={'count':0x0,'rows':[]},_0x55fd1d=_[_0x2c71cd('0x28')](db['JscriptySessionReport']['rawAttributes'],function(_0x211db4){const _0x8d0f03=_0x2c71cd;return{'name':_0x211db4[_0x8d0f03('0xb')],'type':_0x211db4[_0x8d0f03('0x14')][_0x8d0f03('0x38')]};});_0x5747da[_0x2c71cd('0x1f')]=_[_0x2c71cd('0x28')](_0x55fd1d,'name'),_0x5747da['query']=_['keys'](_0x3ca0b9[_0x2c71cd('0x26')]),_0x5747da[_0x2c71cd('0x9')]=_['intersection'](_0x5747da[_0x2c71cd('0x1f')],_0x5747da[_0x2c71cd('0x26')]),_0x33c8de[_0x2c71cd('0x37')]=_['intersection'](_0x5747da['model'],qs['fields'](_0x3ca0b9[_0x2c71cd('0x26')]['fields'])),_0x33c8de[_0x2c71cd('0x37')]=_0x33c8de[_0x2c71cd('0x37')][_0x2c71cd('0x1b')]?_0x33c8de[_0x2c71cd('0x37')]:_0x5747da[_0x2c71cd('0x1f')];typeof _0x3ca0b9[_0x2c71cd('0x26')][_0x2c71cd('0x1e')]===_0x2c71cd('0x3a')&&(_0x33c8de[_0x2c71cd('0x31')]=qs[_0x2c71cd('0x31')](_0x3ca0b9['query'][_0x2c71cd('0x31')]),_0x33c8de[_0x2c71cd('0x32')]=qs[_0x2c71cd('0x32')](_0x3ca0b9[_0x2c71cd('0x26')]['offset']));_0x33c8de[_0x2c71cd('0x1')]=qs[_0x2c71cd('0x36')](_0x3ca0b9['query'][_0x2c71cd('0x36')]),_0x33c8de['where']=qs[_0x2c71cd('0x9')](_['pick'](_0x3ca0b9[_0x2c71cd('0x26')],_0x5747da['filters']),_0x55fd1d);_0x3ca0b9[_0x2c71cd('0x26')][_0x2c71cd('0x11')]&&(_0x33c8de[_0x2c71cd('0x4')]=_[_0x2c71cd('0x3b')](_0x33c8de['where'],{[Op['or']]:_[_0x2c71cd('0x28')](_0x55fd1d,function(_0x13fc49){const _0x453df4=_0x2c71cd;if(_0x13fc49['type']!==_0x453df4('0x1a')){const _0x3324fb={};return _0x3324fb[_0x13fc49[_0x453df4('0x0')]]={[Op[_0x453df4('0x12')]]:'%'+_0x3ca0b9['query'][_0x453df4('0x11')]+'%'},_0x3324fb;}})}));_0x33c8de=_[_0x2c71cd('0x3b')]({},_0x33c8de,_0x3ca0b9[_0x2c71cd('0x8')]);const _0x41731b={'where':_0x33c8de[_0x2c71cd('0x4')]};return db[_0x2c71cd('0x3')][_0x2c71cd('0x18')](_0x41731b)['then'](function(_0x22eb98){const _0x287463=_0x2c71cd;return _0x5c9b33['count']=_0x22eb98,_0x3ca0b9[_0x287463('0x26')][_0x287463('0x2d')]&&(_0x33c8de['include']=[{'all':!![]}]),db['JscriptySessionReport'][_0x287463('0xe')](_0x33c8de);})['then'](function(_0x330451){const _0x1d9077=_0x2c71cd;return _0x5c9b33[_0x1d9077('0x19')]=_0x330451,_0x5c9b33;})[_0x2c71cd('0x15')](respondWithFilteredResult(_0x12412b,_0x33c8de))[_0x2c71cd('0x39')](handleError(_0x12412b,null));},exports[_0x41d78b('0x27')]=function(_0x4e7ec5,_0x426adf){const _0x2cf5c7=_0x41d78b;let _0x7a444={'raw':!![],'where':{'id':_0x4e7ec5[_0x2cf5c7('0x24')]['id']}};const _0x26aa40={};return _0x26aa40[_0x2cf5c7('0x1f')]=_['keys'](db[_0x2cf5c7('0x3')][_0x2cf5c7('0x23')]),_0x26aa40['query']=_[_0x2cf5c7('0xa')](_0x4e7ec5[_0x2cf5c7('0x26')]),_0x26aa40[_0x2cf5c7('0x9')]=_[_0x2cf5c7('0x5')](_0x26aa40['model'],_0x26aa40['query']),_0x7a444[_0x2cf5c7('0x37')]=_[_0x2cf5c7('0x5')](_0x26aa40[_0x2cf5c7('0x1f')],qs[_0x2cf5c7('0x34')](_0x4e7ec5['query'][_0x2cf5c7('0x34')])),_0x7a444[_0x2cf5c7('0x37')]=_0x7a444[_0x2cf5c7('0x37')][_0x2cf5c7('0x1b')]?_0x7a444[_0x2cf5c7('0x37')]:_0x26aa40['model'],_0x4e7ec5[_0x2cf5c7('0x26')][_0x2cf5c7('0x2d')]&&(_0x7a444[_0x2cf5c7('0x10')]=[{'all':!![]}]),_0x7a444=_[_0x2cf5c7('0x3b')]({},_0x7a444,_0x4e7ec5[_0x2cf5c7('0x8')]),db[_0x2cf5c7('0x3')][_0x2cf5c7('0x33')](_0x7a444)[_0x2cf5c7('0x15')](handleEntityNotFound(_0x426adf,null))['then'](respondWithResult(_0x426adf,null))['catch'](handleError(_0x426adf,null));},exports[_0x41d78b('0x13')]=function(_0x5c655b,_0x15f507){const _0x1367e3=_0x41d78b;return db[_0x1367e3('0x3')]['create'](_0x5c655b[_0x1367e3('0x1d')],{})[_0x1367e3('0x15')](respondWithResult(_0x15f507,0xc9))[_0x1367e3('0x39')](handleError(_0x15f507,null));},exports['update']=function(_0x359004,_0x554221){const _0x5c9c38=_0x41d78b;return _0x359004[_0x5c9c38('0x1d')]['id']&&delete _0x359004['body']['id'],db['JscriptySessionReport'][_0x5c9c38('0x33')]({'where':{'id':_0x359004[_0x5c9c38('0x24')]['id']}})[_0x5c9c38('0x15')](handleEntityNotFound(_0x554221,null))[_0x5c9c38('0x15')](saveUpdates(_0x359004[_0x5c9c38('0x1d')],null))[_0x5c9c38('0x15')](respondWithResult(_0x554221,null))['catch'](handleError(_0x554221,null));},exports[_0x41d78b('0x2a')]=function(_0x21c4a9,_0x3b94fa){const _0x2fa8bc=_0x41d78b;return db[_0x2fa8bc('0x3')][_0x2fa8bc('0x33')]({'where':{'id':_0x21c4a9[_0x2fa8bc('0x24')]['id']}})[_0x2fa8bc('0x15')](handleEntityNotFound(_0x3b94fa,null))[_0x2fa8bc('0x15')](removeEntity(_0x3b94fa,null))[_0x2fa8bc('0x39')](handleError(_0x3b94fa,null));},exports['describe']=function(_0x2f14a6,_0x4ed2d3){const _0x470791=_0x41d78b;return db[_0x470791('0x3')][_0x470791('0xd')]()[_0x470791('0x15')](respondWithResult(_0x4ed2d3,null))[_0x470791('0x39')](handleError(_0x4ed2d3,null));},exports['getQuestions']=function(_0x281d8a,_0xa065ee){const _0x4278d3=_0x41d78b;let _0x2a78a9={'raw':!![],'where':{}};const _0x152f86={},_0x26ed8f={'count':0x0,'rows':[]};return db[_0x4278d3('0x3')][_0x4278d3('0x33')]({'where':{'id':_0x281d8a[_0x4278d3('0x24')]['id']}})[_0x4278d3('0x15')](handleEntityNotFound(_0xa065ee,null))[_0x4278d3('0x15')](function(_0x358d48){const _0x402788=_0x4278d3;if(_0x358d48)return _0x152f86[_0x402788('0x1f')]=_[_0x402788('0xa')](db['JscriptyQuestionReport'][_0x402788('0x23')]),_0x152f86['query']=_[_0x402788('0xa')](_0x281d8a['query']),_0x152f86[_0x402788('0x9')]=_['intersection'](_0x152f86[_0x402788('0x1f')],_0x152f86[_0x402788('0x26')]),_0x2a78a9['attributes']=_[_0x402788('0x5')](_0x152f86[_0x402788('0x1f')],qs[_0x402788('0x34')](_0x281d8a[_0x402788('0x26')][_0x402788('0x34')])),_0x2a78a9['attributes']=_0x2a78a9['attributes'][_0x402788('0x1b')]?_0x2a78a9[_0x402788('0x37')]:_0x152f86[_0x402788('0x1f')],typeof _0x281d8a[_0x402788('0x26')][_0x402788('0x1e')]===_0x402788('0x3a')&&(_0x2a78a9['limit']=qs[_0x402788('0x31')](_0x281d8a[_0x402788('0x26')]['limit']),_0x2a78a9[_0x402788('0x32')]=qs[_0x402788('0x32')](_0x281d8a[_0x402788('0x26')]['offset'])),_0x2a78a9[_0x402788('0x1')]=qs['sort'](_0x281d8a[_0x402788('0x26')][_0x402788('0x36')]),_0x2a78a9[_0x402788('0x4')]=qs[_0x402788('0x9')](_[_0x402788('0x2')](_0x281d8a[_0x402788('0x26')],_0x152f86[_0x402788('0x9')])),_0x2a78a9[_0x402788('0x4')][_0x402788('0x20')]=_0x358d48['id'],_0x281d8a[_0x402788('0x26')][_0x402788('0x11')]&&(_0x2a78a9['where']=_[_0x402788('0x3b')](_0x2a78a9['where'],{[Op['or']]:_[_0x402788('0x28')](_0x2a78a9[_0x402788('0x37')],function(_0x174b5d){const _0x3b3534=_0x402788,_0x4214a3={};return _0x4214a3[_0x174b5d]={[Op[_0x3b3534('0x12')]]:'%'+_0x281d8a[_0x3b3534('0x26')][_0x3b3534('0x11')]+'%'},_0x4214a3;})})),_0x2a78a9=_[_0x402788('0x3b')]({},_0x2a78a9,_0x281d8a[_0x402788('0x8')]),db['JscriptyQuestionReport'][_0x402788('0x18')]({'where':_0x2a78a9['where']})[_0x402788('0x15')](function(_0x2095ec){const _0x169122=_0x402788;return _0x26ed8f[_0x169122('0x18')]=_0x2095ec,_0x281d8a[_0x169122('0x26')]['includeAll']&&(_0x2a78a9[_0x169122('0x10')]=[{'all':!![]}]),db[_0x169122('0x2c')][_0x169122('0xe')](_0x2a78a9);})['then'](function(_0x3e80b9){const _0x45911a=_0x402788;return _0x26ed8f[_0x45911a('0x19')]=_0x3e80b9,_0x26ed8f;});})['then'](respondWithFilteredResult(_0xa065ee,_0x2a78a9))['catch'](handleError(_0xa065ee,null));};
\ No newline at end of file