Built motion from commit bfc7a72f7045b27461c9a5d1f71c1a658cfd0b8b. Version 3.0.0...
[motion-next.git] / server / api / voiceDialReport / voiceDialReport.controller.js
index ce5f9e2..bbec90b 100644 (file)
@@ -1 +1 @@
-const a722_0x152a=['VoiceDialReport','end','findAll','status','intersection','include','filters','VIRTUAL','order','json','count','sort','merge','pick','type','offset','body','params','attributes','../../components/parsers/qs','keys','update','key','index','error','options','../../mysqldb','model','rawAttributes','query','show','like','create','then','set','nolimit','includeAll','where','stack','filter','catch','describe','../../config/logger','rows','name','limit','destroy','sequelize','map'];(function(_0x3dfdcc,_0x152a6c){const _0x2d09db=function(_0x496dd1){while(--_0x496dd1){_0x3dfdcc['push'](_0x3dfdcc['shift']());}};_0x2d09db(++_0x152a6c);}(a722_0x152a,0x1ea));const a722_0x2d09=function(_0x3dfdcc,_0x152a6c){_0x3dfdcc=_0x3dfdcc-0x0;let _0x2d09db=a722_0x152a[_0x3dfdcc];return _0x2d09db;};const _0x8354e7=a722_0x2d09;'use strict';const _=require('lodash'),qs=require(_0x8354e7('0x13')),logger=require(_0x8354e7('0x2a'))('api'),db=require(_0x8354e7('0x1a'))['db'],{Op}=require(_0x8354e7('0x2f'));function respondWithResult(_0x496dd1,_0xc17eb0){return _0xc17eb0=_0xc17eb0||0xc8,function(_0x1cdf28){const _0x429149=a722_0x2d09;if(_0x1cdf28)return _0x496dd1[_0x429149('0x3')](_0xc17eb0)[_0x429149('0x9')](_0x1cdf28);};}function respondWithFilteredResult(_0x53bfc3,_0x5811cd){return function(_0xc3c2d3){const _0x358fcd=a722_0x2d09;if(_0xc3c2d3){const _0x494d7d=_0xc3c2d3[_0x358fcd('0xa')],_0x13921e=_0x5811cd[_0x358fcd('0xf')];let _0x317459=_0x5811cd['offset']+_0x5811cd[_0x358fcd('0x2d')],_0x2f69ce;return _0x317459>=_0x494d7d?(_0x317459=_0x494d7d,_0x2f69ce=0xc8):_0x2f69ce=0xce,_0x53bfc3['status'](_0x2f69ce),_0x53bfc3[_0x358fcd('0x22')]('Content-Range',_0x13921e+'-'+_0x317459+'/'+_0x494d7d)[_0x358fcd('0x9')](_0xc3c2d3);}return null;};}function saveUpdates(_0x1abb61){return function(_0x269bca){if(_0x269bca)return _0x269bca['update'](_0x1abb61)['then'](function(_0x39a110){return _0x39a110;});return null;};}function removeEntity(_0x57c027){return function(_0x3adc9f){const _0x2a9fed=a722_0x2d09;if(_0x3adc9f)return _0x3adc9f[_0x2a9fed('0x2e')]()[_0x2a9fed('0x21')](function(){const _0x97df28=_0x2a9fed;_0x57c027['status'](0xcc)[_0x97df28('0x1')]();});};}function handleEntityNotFound(_0x475dd2){return function(_0x3ec3fc){return!_0x3ec3fc&&_0x475dd2['sendStatus'](0x194),_0x3ec3fc;};}function handleError(_0xaff78a,_0x487fa0){return _0x487fa0=_0x487fa0||0x1f4,function(_0x2cb80){const _0x3aeeef=a722_0x2d09;logger[_0x3aeeef('0x18')](_0x2cb80[_0x3aeeef('0x26')]),_0x2cb80[_0x3aeeef('0x2c')]&&delete _0x2cb80[_0x3aeeef('0x2c')],_0xaff78a[_0x3aeeef('0x3')](_0x487fa0)['send'](_0x2cb80);};}exports[_0x8354e7('0x17')]=function(_0x4a9b74,_0x17056b){const _0xb5af56=_0x8354e7;let _0x5edf9b={};const _0x58e68b={},_0x5db408={'count':0x0,'rows':[]},_0x727b70=_[_0xb5af56('0x30')](db[_0xb5af56('0x0')][_0xb5af56('0x1c')],function(_0x4d1e56){const _0x20eac0=_0xb5af56;return{'name':_0x4d1e56['fieldName'],'type':_0x4d1e56[_0x20eac0('0xe')][_0x20eac0('0x16')]};});_0x58e68b[_0xb5af56('0x1b')]=_[_0xb5af56('0x30')](_0x727b70,_0xb5af56('0x2c')),_0x58e68b['query']=_[_0xb5af56('0x14')](_0x4a9b74[_0xb5af56('0x1d')]),_0x58e68b['filters']=_['intersection'](_0x58e68b[_0xb5af56('0x1b')],_0x58e68b[_0xb5af56('0x1d')]),_0x5edf9b[_0xb5af56('0x12')]=_[_0xb5af56('0x4')](_0x58e68b['model'],qs['fields'](_0x4a9b74[_0xb5af56('0x1d')]['fields'])),_0x5edf9b[_0xb5af56('0x12')]=_0x5edf9b[_0xb5af56('0x12')]['length']?_0x5edf9b[_0xb5af56('0x12')]:_0x58e68b[_0xb5af56('0x1b')];typeof _0x4a9b74[_0xb5af56('0x1d')][_0xb5af56('0x23')]==='undefined'&&(_0x5edf9b[_0xb5af56('0x2d')]=qs[_0xb5af56('0x2d')](_0x4a9b74[_0xb5af56('0x1d')][_0xb5af56('0x2d')]),_0x5edf9b[_0xb5af56('0xf')]=qs[_0xb5af56('0xf')](_0x4a9b74[_0xb5af56('0x1d')][_0xb5af56('0xf')]));_0x5edf9b[_0xb5af56('0x8')]=qs[_0xb5af56('0xb')](_0x4a9b74[_0xb5af56('0x1d')]['sort']),_0x5edf9b[_0xb5af56('0x25')]=qs[_0xb5af56('0x6')](_[_0xb5af56('0xd')](_0x4a9b74[_0xb5af56('0x1d')],_0x58e68b['filters']),_0x727b70);_0x4a9b74['query'][_0xb5af56('0x27')]&&(_0x5edf9b['where']=_['merge'](_0x5edf9b[_0xb5af56('0x25')],{[Op['or']]:_[_0xb5af56('0x30')](_0x727b70,function(_0x1ef7b8){const _0x3422e0=_0xb5af56;if(_0x1ef7b8['type']!==_0x3422e0('0x7')){const _0x2778ed={};return _0x2778ed[_0x1ef7b8['name']]={[Op[_0x3422e0('0x1f')]]:'%'+_0x4a9b74['query']['filter']+'%'},_0x2778ed;}})}));_0x5edf9b=_[_0xb5af56('0xc')]({},_0x5edf9b,_0x4a9b74[_0xb5af56('0x19')]);const _0x461e6b={'where':_0x5edf9b[_0xb5af56('0x25')]};return db[_0xb5af56('0x0')]['count'](_0x461e6b)[_0xb5af56('0x21')](function(_0x5db3a5){const _0x2fbc96=_0xb5af56;return _0x5db408[_0x2fbc96('0xa')]=_0x5db3a5,_0x4a9b74['query']['includeAll']&&(_0x5edf9b[_0x2fbc96('0x5')]=[{'all':!![]}]),db['VoiceDialReport'][_0x2fbc96('0x2')](_0x5edf9b);})[_0xb5af56('0x21')](function(_0xeb64b4){const _0x3761ad=_0xb5af56;return _0x5db408[_0x3761ad('0x2b')]=_0xeb64b4,_0x5db408;})[_0xb5af56('0x21')](respondWithFilteredResult(_0x17056b,_0x5edf9b))['catch'](handleError(_0x17056b,null));},exports[_0x8354e7('0x1e')]=function(_0x452584,_0x5af559){const _0x32668b=_0x8354e7;let _0x21e4b8={'raw':!![],'where':{'id':_0x452584[_0x32668b('0x11')]['id']}};const _0x4ea9e9={};return _0x4ea9e9[_0x32668b('0x1b')]=_[_0x32668b('0x14')](db[_0x32668b('0x0')]['rawAttributes']),_0x4ea9e9[_0x32668b('0x1d')]=_['keys'](_0x452584[_0x32668b('0x1d')]),_0x4ea9e9[_0x32668b('0x6')]=_[_0x32668b('0x4')](_0x4ea9e9[_0x32668b('0x1b')],_0x4ea9e9[_0x32668b('0x1d')]),_0x21e4b8[_0x32668b('0x12')]=_['intersection'](_0x4ea9e9[_0x32668b('0x1b')],qs['fields'](_0x452584[_0x32668b('0x1d')]['fields'])),_0x21e4b8['attributes']=_0x21e4b8[_0x32668b('0x12')]['length']?_0x21e4b8[_0x32668b('0x12')]:_0x4ea9e9[_0x32668b('0x1b')],_0x452584[_0x32668b('0x1d')][_0x32668b('0x24')]&&(_0x21e4b8[_0x32668b('0x5')]=[{'all':!![]}]),_0x21e4b8=_[_0x32668b('0xc')]({},_0x21e4b8,_0x452584[_0x32668b('0x19')]),db[_0x32668b('0x0')]['findOne'](_0x21e4b8)[_0x32668b('0x21')](handleEntityNotFound(_0x5af559,null))[_0x32668b('0x21')](respondWithResult(_0x5af559,null))['catch'](handleError(_0x5af559,null));},exports[_0x8354e7('0x20')]=function(_0x3f44e8,_0x2d1a56){const _0x35ad92=_0x8354e7;return db[_0x35ad92('0x0')]['create'](_0x3f44e8[_0x35ad92('0x10')],{})[_0x35ad92('0x21')](respondWithResult(_0x2d1a56,0xc9))[_0x35ad92('0x28')](handleError(_0x2d1a56,null));},exports[_0x8354e7('0x15')]=function(_0x4b687a,_0x5163dc){const _0xf2349=_0x8354e7;return _0x4b687a[_0xf2349('0x10')]['id']&&delete _0x4b687a['body']['id'],db['VoiceDialReport']['findOne']({'where':{'id':_0x4b687a[_0xf2349('0x11')]['id']}})[_0xf2349('0x21')](handleEntityNotFound(_0x5163dc,null))[_0xf2349('0x21')](saveUpdates(_0x4b687a[_0xf2349('0x10')],null))[_0xf2349('0x21')](respondWithResult(_0x5163dc,null))[_0xf2349('0x28')](handleError(_0x5163dc,null));},exports['destroy']=function(_0x44e688,_0x25fa57){const _0x23b19a=_0x8354e7;return db['VoiceDialReport']['findOne']({'where':{'id':_0x44e688[_0x23b19a('0x11')]['id']}})['then'](handleEntityNotFound(_0x25fa57,null))['then'](removeEntity(_0x25fa57,null))['catch'](handleError(_0x25fa57,null));},exports[_0x8354e7('0x29')]=function(_0x46330b,_0x952f3d){const _0x408d30=_0x8354e7;return db[_0x408d30('0x0')][_0x408d30('0x29')]()[_0x408d30('0x21')](respondWithResult(_0x952f3d,null))[_0x408d30('0x28')](handleError(_0x952f3d,null));};
\ No newline at end of file
+const a722_0x5b49=['includeAll','stack','intersection','rawAttributes','json','fieldName','count','show','describe','VIRTUAL','rows','end','key','sequelize','query','order','merge','send','attributes','lodash','map','keys','create','length','findOne','../../config/logger','destroy','catch','params','then','name','error','status','sort','undefined','type','sendStatus','include','offset','body','VoiceDialReport','limit','pick','model','options','filter','filters','fields','where','set','Content-Range'];(function(_0x79e4fa,_0x5b49ca){const _0x3ec2ed=function(_0x44bcfe){while(--_0x44bcfe){_0x79e4fa['push'](_0x79e4fa['shift']());}};_0x3ec2ed(++_0x5b49ca);}(a722_0x5b49,0x179));const a722_0x3ec2=function(_0x79e4fa,_0x5b49ca){_0x79e4fa=_0x79e4fa-0x0;let _0x3ec2ed=a722_0x5b49[_0x79e4fa];return _0x3ec2ed;};const _0x2b8652=a722_0x3ec2;'use strict';const _=require(_0x2b8652('0x32')),qs=require('../../components/parsers/qs'),logger=require(_0x2b8652('0x5'))('api'),db=require('../../mysqldb')['db'],{Op}=require(_0x2b8652('0x2c'));function respondWithResult(_0x44bcfe,_0x40f4a9){return _0x40f4a9=_0x40f4a9||0xc8,function(_0x13ffe8){const _0x5770ba=a722_0x3ec2;if(_0x13ffe8)return _0x44bcfe[_0x5770ba('0xc')](_0x40f4a9)[_0x5770ba('0x23')](_0x13ffe8);};}function respondWithFilteredResult(_0x498739,_0x1ceceb){return function(_0x148253){const _0xb4f1c3=a722_0x3ec2;if(_0x148253){const _0x428695=_0x148253['count'],_0x7e18bc=_0x1ceceb[_0xb4f1c3('0x12')];let _0xb8d444=_0x1ceceb[_0xb4f1c3('0x12')]+_0x1ceceb[_0xb4f1c3('0x15')],_0x11871d;return _0xb8d444>=_0x428695?(_0xb8d444=_0x428695,_0x11871d=0xc8):_0x11871d=0xce,_0x498739[_0xb4f1c3('0xc')](_0x11871d),_0x498739[_0xb4f1c3('0x1d')](_0xb4f1c3('0x1e'),_0x7e18bc+'-'+_0xb8d444+'/'+_0x428695)[_0xb4f1c3('0x23')](_0x148253);}return null;};}function saveUpdates(_0x25ff59){return function(_0x2065d4){const _0x574bec=a722_0x3ec2;if(_0x2065d4)return _0x2065d4['update'](_0x25ff59)[_0x574bec('0x9')](function(_0x4fe7e5){return _0x4fe7e5;});return null;};}function removeEntity(_0x2531dd){return function(_0x526170){const _0x35e548=a722_0x3ec2;if(_0x526170)return _0x526170['destroy']()[_0x35e548('0x9')](function(){const _0xb593c6=_0x35e548;_0x2531dd['status'](0xcc)[_0xb593c6('0x2a')]();});};}function handleEntityNotFound(_0x223987){return function(_0x4e68a0){const _0x104328=a722_0x3ec2;return!_0x4e68a0&&_0x223987[_0x104328('0x10')](0x194),_0x4e68a0;};}function handleError(_0x3b89c4,_0x3ee0d0){return _0x3ee0d0=_0x3ee0d0||0x1f4,function(_0x59b491){const _0xd265ca=a722_0x3ec2;logger[_0xd265ca('0xb')](_0x59b491[_0xd265ca('0x20')]),_0x59b491[_0xd265ca('0xa')]&&delete _0x59b491[_0xd265ca('0xa')],_0x3b89c4[_0xd265ca('0xc')](_0x3ee0d0)[_0xd265ca('0x30')](_0x59b491);};}exports['index']=function(_0x1decc7,_0x21ee88){const _0x2db050=_0x2b8652;let _0x549a58={};const _0x34d897={},_0x29f6f8={'count':0x0,'rows':[]},_0x3e6e47=_[_0x2db050('0x0')](db[_0x2db050('0x14')][_0x2db050('0x22')],function(_0x21761e){const _0x5b6ebd=_0x2db050;return{'name':_0x21761e[_0x5b6ebd('0x24')],'type':_0x21761e[_0x5b6ebd('0xf')][_0x5b6ebd('0x2b')]};});_0x34d897[_0x2db050('0x17')]=_[_0x2db050('0x0')](_0x3e6e47,_0x2db050('0xa')),_0x34d897[_0x2db050('0x2d')]=_[_0x2db050('0x1')](_0x1decc7['query']),_0x34d897['filters']=_[_0x2db050('0x21')](_0x34d897[_0x2db050('0x17')],_0x34d897[_0x2db050('0x2d')]),_0x549a58[_0x2db050('0x31')]=_[_0x2db050('0x21')](_0x34d897[_0x2db050('0x17')],qs[_0x2db050('0x1b')](_0x1decc7[_0x2db050('0x2d')][_0x2db050('0x1b')])),_0x549a58[_0x2db050('0x31')]=_0x549a58[_0x2db050('0x31')][_0x2db050('0x3')]?_0x549a58[_0x2db050('0x31')]:_0x34d897['model'];typeof _0x1decc7[_0x2db050('0x2d')]['nolimit']===_0x2db050('0xe')&&(_0x549a58[_0x2db050('0x15')]=qs['limit'](_0x1decc7[_0x2db050('0x2d')][_0x2db050('0x15')]),_0x549a58[_0x2db050('0x12')]=qs[_0x2db050('0x12')](_0x1decc7[_0x2db050('0x2d')][_0x2db050('0x12')]));_0x549a58[_0x2db050('0x2e')]=qs[_0x2db050('0xd')](_0x1decc7['query'][_0x2db050('0xd')]),_0x549a58[_0x2db050('0x1c')]=qs[_0x2db050('0x1a')](_[_0x2db050('0x16')](_0x1decc7[_0x2db050('0x2d')],_0x34d897['filters']),_0x3e6e47);_0x1decc7[_0x2db050('0x2d')]['filter']&&(_0x549a58[_0x2db050('0x1c')]=_[_0x2db050('0x2f')](_0x549a58['where'],{[Op['or']]:_[_0x2db050('0x0')](_0x3e6e47,function(_0x35f34b){const _0x447e93=_0x2db050;if(_0x35f34b[_0x447e93('0xf')]!==_0x447e93('0x28')){const _0x3458be={};return _0x3458be[_0x35f34b[_0x447e93('0xa')]]={[Op['like']]:'%'+_0x1decc7[_0x447e93('0x2d')][_0x447e93('0x19')]+'%'},_0x3458be;}})}));_0x549a58=_['merge']({},_0x549a58,_0x1decc7['options']);const _0x18c69b={'where':_0x549a58[_0x2db050('0x1c')]};return db[_0x2db050('0x14')][_0x2db050('0x25')](_0x18c69b)[_0x2db050('0x9')](function(_0x3658df){const _0x21fe5a=_0x2db050;return _0x29f6f8['count']=_0x3658df,_0x1decc7[_0x21fe5a('0x2d')][_0x21fe5a('0x1f')]&&(_0x549a58[_0x21fe5a('0x11')]=[{'all':!![]}]),db[_0x21fe5a('0x14')]['findAll'](_0x549a58);})[_0x2db050('0x9')](function(_0x1a6e71){const _0xfdc222=_0x2db050;return _0x29f6f8[_0xfdc222('0x29')]=_0x1a6e71,_0x29f6f8;})['then'](respondWithFilteredResult(_0x21ee88,_0x549a58))[_0x2db050('0x7')](handleError(_0x21ee88,null));},exports[_0x2b8652('0x26')]=function(_0xa74fcd,_0x53eac0){const _0x178692=_0x2b8652;let _0x41dc4e={'raw':!![],'where':{'id':_0xa74fcd[_0x178692('0x8')]['id']}};const _0x1bc81b={};return _0x1bc81b['model']=_['keys'](db[_0x178692('0x14')][_0x178692('0x22')]),_0x1bc81b[_0x178692('0x2d')]=_[_0x178692('0x1')](_0xa74fcd['query']),_0x1bc81b[_0x178692('0x1a')]=_[_0x178692('0x21')](_0x1bc81b[_0x178692('0x17')],_0x1bc81b[_0x178692('0x2d')]),_0x41dc4e[_0x178692('0x31')]=_[_0x178692('0x21')](_0x1bc81b[_0x178692('0x17')],qs[_0x178692('0x1b')](_0xa74fcd['query']['fields'])),_0x41dc4e['attributes']=_0x41dc4e[_0x178692('0x31')][_0x178692('0x3')]?_0x41dc4e[_0x178692('0x31')]:_0x1bc81b[_0x178692('0x17')],_0xa74fcd['query'][_0x178692('0x1f')]&&(_0x41dc4e[_0x178692('0x11')]=[{'all':!![]}]),_0x41dc4e=_[_0x178692('0x2f')]({},_0x41dc4e,_0xa74fcd[_0x178692('0x18')]),db['VoiceDialReport'][_0x178692('0x4')](_0x41dc4e)[_0x178692('0x9')](handleEntityNotFound(_0x53eac0,null))[_0x178692('0x9')](respondWithResult(_0x53eac0,null))[_0x178692('0x7')](handleError(_0x53eac0,null));},exports[_0x2b8652('0x2')]=function(_0x244e6c,_0x14e95f){const _0x1172ab=_0x2b8652;return db[_0x1172ab('0x14')][_0x1172ab('0x2')](_0x244e6c[_0x1172ab('0x13')],{})[_0x1172ab('0x9')](respondWithResult(_0x14e95f,0xc9))['catch'](handleError(_0x14e95f,null));},exports['update']=function(_0x5e129a,_0x1ba7c7){const _0x2230bb=_0x2b8652;return _0x5e129a[_0x2230bb('0x13')]['id']&&delete _0x5e129a[_0x2230bb('0x13')]['id'],db[_0x2230bb('0x14')][_0x2230bb('0x4')]({'where':{'id':_0x5e129a[_0x2230bb('0x8')]['id']}})[_0x2230bb('0x9')](handleEntityNotFound(_0x1ba7c7,null))[_0x2230bb('0x9')](saveUpdates(_0x5e129a[_0x2230bb('0x13')],null))[_0x2230bb('0x9')](respondWithResult(_0x1ba7c7,null))[_0x2230bb('0x7')](handleError(_0x1ba7c7,null));},exports[_0x2b8652('0x6')]=function(_0x1a0b46,_0x4386b8){const _0x217416=_0x2b8652;return db['VoiceDialReport'][_0x217416('0x4')]({'where':{'id':_0x1a0b46[_0x217416('0x8')]['id']}})[_0x217416('0x9')](handleEntityNotFound(_0x4386b8,null))['then'](removeEntity(_0x4386b8,null))[_0x217416('0x7')](handleError(_0x4386b8,null));},exports[_0x2b8652('0x27')]=function(_0x192905,_0x24ea9a){const _0x4f4081=_0x2b8652;return db[_0x4f4081('0x14')][_0x4f4081('0x27')]()['then'](respondWithResult(_0x24ea9a,null))[_0x4f4081('0x7')](handleError(_0x24ea9a,null));};
\ No newline at end of file