Built motion from commit a9fb64cc6defd8fb3a5cc199221f878e91c0e969. Version 3.0.0...
[motion-next.git] / server / api / faxQueueReport / faxQueueReport.controller.js
index a62da47..774cbdb 100644 (file)
@@ -1 +1 @@
-const a219_0xd016=['name','include','merge','VIRTUAL','describe','nolimit','params','pick','../../components/parsers/qs','findOne','body','options','show','keys','send','fieldName','rows','query','Content-Range','set','create','intersection','includeAll','rawAttributes','then','stack','sendStatus','api','../../mysqldb','map','../../config/logger','lodash','findAll','order','filter','update','filters','key','model','FaxQueueReport','catch','count','destroy','where','offset','attributes','type','sort','sequelize','fields','limit','status','end'];(function(_0xab7071,_0xd016e9){const _0x429865=function(_0x1ae52e){while(--_0x1ae52e){_0xab7071['push'](_0xab7071['shift']());}};_0x429865(++_0xd016e9);}(a219_0xd016,0x140));const a219_0x4298=function(_0xab7071,_0xd016e9){_0xab7071=_0xab7071-0x0;let _0x429865=a219_0xd016[_0xab7071];return _0x429865;};const _0x1603d6=a219_0x4298;'use strict';const _=require(_0x1603d6('0x1d')),qs=require(_0x1603d6('0x6')),logger=require(_0x1603d6('0x1c'))(_0x1603d6('0x19')),db=require(_0x1603d6('0x1a'))['db'],{Op}=require(_0x1603d6('0x2e'));function respondWithResult(_0x1ae52e,_0x42800d){return _0x42800d=_0x42800d||0xc8,function(_0x1d1aa9){const _0x5c45b2=a219_0x4298;if(_0x1d1aa9)return _0x1ae52e[_0x5c45b2('0x31')](_0x42800d)['json'](_0x1d1aa9);};}function respondWithFilteredResult(_0x2ad5bc,_0x40e444){return function(_0x3bfefa){const _0x200613=a219_0x4298;if(_0x3bfefa){const _0x1b803a=_0x3bfefa[_0x200613('0x27')],_0x103282=_0x40e444[_0x200613('0x2a')];let _0xe521be=_0x40e444[_0x200613('0x2a')]+_0x40e444[_0x200613('0x30')],_0x1cb9da;return _0xe521be>=_0x1b803a?(_0xe521be=_0x1b803a,_0x1cb9da=0xc8):_0x1cb9da=0xce,_0x2ad5bc[_0x200613('0x31')](_0x1cb9da),_0x2ad5bc[_0x200613('0x11')](_0x200613('0x10'),_0x103282+'-'+_0xe521be+'/'+_0x1b803a)['json'](_0x3bfefa);}return null;};}function saveUpdates(_0x52d6bd){return function(_0x282743){const _0x5882b5=a219_0x4298;if(_0x282743)return _0x282743['update'](_0x52d6bd)[_0x5882b5('0x16')](function(_0x52ca23){return _0x52ca23;});return null;};}function removeEntity(_0x3f94a0){return function(_0x336704){if(_0x336704)return _0x336704['destroy']()['then'](function(){const _0x1737ef=a219_0x4298;_0x3f94a0[_0x1737ef('0x31')](0xcc)[_0x1737ef('0x32')]();});};}function handleEntityNotFound(_0xe1b8b7){return function(_0x135b6d){const _0x3c0d55=a219_0x4298;return!_0x135b6d&&_0xe1b8b7[_0x3c0d55('0x18')](0x194),_0x135b6d;};}function handleError(_0x4217ba,_0x477273){return _0x477273=_0x477273||0x1f4,function(_0x24c8d7){const _0x1397c7=a219_0x4298;logger['error'](_0x24c8d7[_0x1397c7('0x17')]),_0x24c8d7[_0x1397c7('0x33')]&&delete _0x24c8d7['name'],_0x4217ba[_0x1397c7('0x31')](_0x477273)[_0x1397c7('0xc')](_0x24c8d7);};}exports['index']=function(_0x463590,_0x3ed943){const _0x5a043d=_0x1603d6;let _0x42d788={};const _0x40bde5={},_0xb29b22={'count':0x0,'rows':[]},_0x24e659=_[_0x5a043d('0x1b')](db[_0x5a043d('0x25')][_0x5a043d('0x15')],function(_0x27f3e9){const _0x58ab2f=_0x5a043d;return{'name':_0x27f3e9[_0x58ab2f('0xd')],'type':_0x27f3e9[_0x58ab2f('0x2c')][_0x58ab2f('0x23')]};});_0x40bde5[_0x5a043d('0x24')]=_[_0x5a043d('0x1b')](_0x24e659,_0x5a043d('0x33')),_0x40bde5['query']=_[_0x5a043d('0xb')](_0x463590['query']),_0x40bde5['filters']=_['intersection'](_0x40bde5[_0x5a043d('0x24')],_0x40bde5[_0x5a043d('0xf')]),_0x42d788[_0x5a043d('0x2b')]=_['intersection'](_0x40bde5[_0x5a043d('0x24')],qs[_0x5a043d('0x2f')](_0x463590[_0x5a043d('0xf')][_0x5a043d('0x2f')])),_0x42d788[_0x5a043d('0x2b')]=_0x42d788[_0x5a043d('0x2b')]['length']?_0x42d788['attributes']:_0x40bde5[_0x5a043d('0x24')];typeof _0x463590[_0x5a043d('0xf')][_0x5a043d('0x3')]==='undefined'&&(_0x42d788['limit']=qs[_0x5a043d('0x30')](_0x463590[_0x5a043d('0xf')][_0x5a043d('0x30')]),_0x42d788[_0x5a043d('0x2a')]=qs[_0x5a043d('0x2a')](_0x463590[_0x5a043d('0xf')][_0x5a043d('0x2a')]));_0x42d788[_0x5a043d('0x1f')]=qs[_0x5a043d('0x2d')](_0x463590[_0x5a043d('0xf')][_0x5a043d('0x2d')]),_0x42d788['where']=qs[_0x5a043d('0x22')](_[_0x5a043d('0x5')](_0x463590[_0x5a043d('0xf')],_0x40bde5[_0x5a043d('0x22')]),_0x24e659);_0x463590['query'][_0x5a043d('0x20')]&&(_0x42d788[_0x5a043d('0x29')]=_[_0x5a043d('0x0')](_0x42d788[_0x5a043d('0x29')],{[Op['or']]:_[_0x5a043d('0x1b')](_0x24e659,function(_0x451872){const _0x56272f=_0x5a043d;if(_0x451872[_0x56272f('0x2c')]!==_0x56272f('0x1')){const _0xb9e5f7={};return _0xb9e5f7[_0x451872[_0x56272f('0x33')]]={[Op['like']]:'%'+_0x463590[_0x56272f('0xf')]['filter']+'%'},_0xb9e5f7;}})}));_0x42d788=_[_0x5a043d('0x0')]({},_0x42d788,_0x463590[_0x5a043d('0x9')]);const _0x5eedcc={'where':_0x42d788['where']};return db[_0x5a043d('0x25')][_0x5a043d('0x27')](_0x5eedcc)[_0x5a043d('0x16')](function(_0x346ae6){const _0x24e638=_0x5a043d;return _0xb29b22['count']=_0x346ae6,_0x463590[_0x24e638('0xf')][_0x24e638('0x14')]&&(_0x42d788[_0x24e638('0x34')]=[{'all':!![]}]),db[_0x24e638('0x25')][_0x24e638('0x1e')](_0x42d788);})[_0x5a043d('0x16')](function(_0x195861){const _0xdb4cf2=_0x5a043d;return _0xb29b22[_0xdb4cf2('0xe')]=_0x195861,_0xb29b22;})['then'](respondWithFilteredResult(_0x3ed943,_0x42d788))['catch'](handleError(_0x3ed943,null));},exports[_0x1603d6('0xa')]=function(_0x5e49a2,_0x56f2aa){const _0x118bc9=_0x1603d6;let _0x382aec={'raw':!![],'where':{'id':_0x5e49a2[_0x118bc9('0x4')]['id']}};const _0x56d6e6={};return _0x56d6e6[_0x118bc9('0x24')]=_[_0x118bc9('0xb')](db[_0x118bc9('0x25')][_0x118bc9('0x15')]),_0x56d6e6[_0x118bc9('0xf')]=_[_0x118bc9('0xb')](_0x5e49a2[_0x118bc9('0xf')]),_0x56d6e6[_0x118bc9('0x22')]=_[_0x118bc9('0x13')](_0x56d6e6['model'],_0x56d6e6['query']),_0x382aec[_0x118bc9('0x2b')]=_[_0x118bc9('0x13')](_0x56d6e6[_0x118bc9('0x24')],qs[_0x118bc9('0x2f')](_0x5e49a2[_0x118bc9('0xf')][_0x118bc9('0x2f')])),_0x382aec['attributes']=_0x382aec[_0x118bc9('0x2b')]['length']?_0x382aec[_0x118bc9('0x2b')]:_0x56d6e6[_0x118bc9('0x24')],_0x5e49a2[_0x118bc9('0xf')]['includeAll']&&(_0x382aec[_0x118bc9('0x34')]=[{'all':!![]}]),_0x382aec=_[_0x118bc9('0x0')]({},_0x382aec,_0x5e49a2[_0x118bc9('0x9')]),db[_0x118bc9('0x25')][_0x118bc9('0x7')](_0x382aec)[_0x118bc9('0x16')](handleEntityNotFound(_0x56f2aa,null))[_0x118bc9('0x16')](respondWithResult(_0x56f2aa,null))[_0x118bc9('0x26')](handleError(_0x56f2aa,null));},exports[_0x1603d6('0x12')]=function(_0x4e0311,_0x11c867){const _0x19d7a0=_0x1603d6;return db[_0x19d7a0('0x25')][_0x19d7a0('0x12')](_0x4e0311[_0x19d7a0('0x8')],{})[_0x19d7a0('0x16')](respondWithResult(_0x11c867,0xc9))['catch'](handleError(_0x11c867,null));},exports[_0x1603d6('0x21')]=function(_0xecd30a,_0x215bf5){const _0x26b15c=_0x1603d6;return _0xecd30a[_0x26b15c('0x8')]['id']&&delete _0xecd30a[_0x26b15c('0x8')]['id'],db['FaxQueueReport']['findOne']({'where':{'id':_0xecd30a[_0x26b15c('0x4')]['id']}})[_0x26b15c('0x16')](handleEntityNotFound(_0x215bf5,null))[_0x26b15c('0x16')](saveUpdates(_0xecd30a[_0x26b15c('0x8')],null))[_0x26b15c('0x16')](respondWithResult(_0x215bf5,null))[_0x26b15c('0x26')](handleError(_0x215bf5,null));},exports[_0x1603d6('0x28')]=function(_0x261dd6,_0x30f000){const _0x16ed00=_0x1603d6;return db[_0x16ed00('0x25')]['findOne']({'where':{'id':_0x261dd6['params']['id']}})['then'](handleEntityNotFound(_0x30f000,null))[_0x16ed00('0x16')](removeEntity(_0x30f000,null))[_0x16ed00('0x26')](handleError(_0x30f000,null));},exports[_0x1603d6('0x2')]=function(_0x47a02f,_0x1f15a9){const _0x2c1b12=_0x1603d6;return db['FaxQueueReport'][_0x2c1b12('0x2')]()[_0x2c1b12('0x16')](respondWithResult(_0x1f15a9,null))[_0x2c1b12('0x26')](handleError(_0x1f15a9,null));};
\ No newline at end of file
+const a219_0xa785=['catch','includeAll','order','findAll','rawAttributes','api','filters','query','keys','count','where','intersection','FaxQueueReport','length','update','model','then','attributes','pick','include','limit','status','Content-Range','rows','../../mysqldb','../../components/parsers/qs','stack','fieldName','sequelize','create','show','offset','findOne','nolimit','../../config/logger','name','merge','json','destroy','params','lodash','map','set','fields','filter','undefined','like','sort','describe','options','body','type'];(function(_0x34fd90,_0xa785ca){const _0xabab1a=function(_0x5fb7eb){while(--_0x5fb7eb){_0x34fd90['push'](_0x34fd90['shift']());}};_0xabab1a(++_0xa785ca);}(a219_0xa785,0x136));const a219_0xabab=function(_0x34fd90,_0xa785ca){_0x34fd90=_0x34fd90-0x0;let _0xabab1a=a219_0xa785[_0x34fd90];return _0xabab1a;};const _0x91c1cf=a219_0xabab;'use strict';const _=require(_0x91c1cf('0x2a')),qs=require(_0x91c1cf('0x1b')),logger=require(_0x91c1cf('0x24'))(_0x91c1cf('0x7')),db=require(_0x91c1cf('0x1a'))['db'],{Op}=require(_0x91c1cf('0x1e'));function respondWithResult(_0x5fb7eb,_0xbad83a){return _0xbad83a=_0xbad83a||0xc8,function(_0x36da60){const _0x4d7b7b=a219_0xabab;if(_0x36da60)return _0x5fb7eb['status'](_0xbad83a)[_0x4d7b7b('0x27')](_0x36da60);};}function respondWithFilteredResult(_0x392cf8,_0x27f703){return function(_0x418cd7){const _0xf9856f=a219_0xabab;if(_0x418cd7){const _0x36a1e8=_0x418cd7['count'],_0x1b73c2=_0x27f703[_0xf9856f('0x21')];let _0x3c4cd6=_0x27f703[_0xf9856f('0x21')]+_0x27f703['limit'],_0x4ec045;return _0x3c4cd6>=_0x36a1e8?(_0x3c4cd6=_0x36a1e8,_0x4ec045=0xc8):_0x4ec045=0xce,_0x392cf8[_0xf9856f('0x17')](_0x4ec045),_0x392cf8[_0xf9856f('0x2c')](_0xf9856f('0x18'),_0x1b73c2+'-'+_0x3c4cd6+'/'+_0x36a1e8)[_0xf9856f('0x27')](_0x418cd7);}return null;};}function saveUpdates(_0x5bdf62){return function(_0x3187ca){const _0x139cda=a219_0xabab;if(_0x3187ca)return _0x3187ca[_0x139cda('0x10')](_0x5bdf62)['then'](function(_0x534769){return _0x534769;});return null;};}function removeEntity(_0x23dc6c){return function(_0x2befe7){const _0x3d0d44=a219_0xabab;if(_0x2befe7)return _0x2befe7[_0x3d0d44('0x28')]()[_0x3d0d44('0x12')](function(){const _0x4a9725=_0x3d0d44;_0x23dc6c[_0x4a9725('0x17')](0xcc)['end']();});};}function handleEntityNotFound(_0x1a4ea6){return function(_0x1089a6){return!_0x1089a6&&_0x1a4ea6['sendStatus'](0x194),_0x1089a6;};}function handleError(_0x47b70a,_0x4d95c6){return _0x4d95c6=_0x4d95c6||0x1f4,function(_0x1e224a){const _0x5bcf17=a219_0xabab;logger['error'](_0x1e224a[_0x5bcf17('0x1c')]),_0x1e224a[_0x5bcf17('0x25')]&&delete _0x1e224a[_0x5bcf17('0x25')],_0x47b70a['status'](_0x4d95c6)['send'](_0x1e224a);};}exports['index']=function(_0x1d2c6f,_0x564b8b){const _0x4e7f25=_0x91c1cf;let _0x4d8d76={};const _0x3ae33b={},_0x5a8c81={'count':0x0,'rows':[]},_0x14bbd0=_[_0x4e7f25('0x2b')](db[_0x4e7f25('0xe')][_0x4e7f25('0x6')],function(_0x1c1d29){const _0x3a8ef9=_0x4e7f25;return{'name':_0x1c1d29[_0x3a8ef9('0x1d')],'type':_0x1c1d29[_0x3a8ef9('0x1')]['key']};});_0x3ae33b[_0x4e7f25('0x11')]=_[_0x4e7f25('0x2b')](_0x14bbd0,'name'),_0x3ae33b[_0x4e7f25('0x9')]=_[_0x4e7f25('0xa')](_0x1d2c6f[_0x4e7f25('0x9')]),_0x3ae33b[_0x4e7f25('0x8')]=_[_0x4e7f25('0xd')](_0x3ae33b[_0x4e7f25('0x11')],_0x3ae33b[_0x4e7f25('0x9')]),_0x4d8d76[_0x4e7f25('0x13')]=_[_0x4e7f25('0xd')](_0x3ae33b[_0x4e7f25('0x11')],qs[_0x4e7f25('0x2d')](_0x1d2c6f[_0x4e7f25('0x9')][_0x4e7f25('0x2d')])),_0x4d8d76[_0x4e7f25('0x13')]=_0x4d8d76[_0x4e7f25('0x13')][_0x4e7f25('0xf')]?_0x4d8d76[_0x4e7f25('0x13')]:_0x3ae33b[_0x4e7f25('0x11')];typeof _0x1d2c6f['query'][_0x4e7f25('0x23')]===_0x4e7f25('0x2f')&&(_0x4d8d76[_0x4e7f25('0x16')]=qs[_0x4e7f25('0x16')](_0x1d2c6f[_0x4e7f25('0x9')][_0x4e7f25('0x16')]),_0x4d8d76[_0x4e7f25('0x21')]=qs[_0x4e7f25('0x21')](_0x1d2c6f[_0x4e7f25('0x9')]['offset']));_0x4d8d76[_0x4e7f25('0x4')]=qs[_0x4e7f25('0x31')](_0x1d2c6f[_0x4e7f25('0x9')][_0x4e7f25('0x31')]),_0x4d8d76[_0x4e7f25('0xc')]=qs[_0x4e7f25('0x8')](_[_0x4e7f25('0x14')](_0x1d2c6f[_0x4e7f25('0x9')],_0x3ae33b[_0x4e7f25('0x8')]),_0x14bbd0);_0x1d2c6f[_0x4e7f25('0x9')][_0x4e7f25('0x2e')]&&(_0x4d8d76['where']=_[_0x4e7f25('0x26')](_0x4d8d76[_0x4e7f25('0xc')],{[Op['or']]:_[_0x4e7f25('0x2b')](_0x14bbd0,function(_0x35e7c9){const _0x52385b=_0x4e7f25;if(_0x35e7c9[_0x52385b('0x1')]!=='VIRTUAL'){const _0x115105={};return _0x115105[_0x35e7c9[_0x52385b('0x25')]]={[Op[_0x52385b('0x30')]]:'%'+_0x1d2c6f['query'][_0x52385b('0x2e')]+'%'},_0x115105;}})}));_0x4d8d76=_['merge']({},_0x4d8d76,_0x1d2c6f[_0x4e7f25('0x33')]);const _0x53a442={'where':_0x4d8d76[_0x4e7f25('0xc')]};return db['FaxQueueReport'][_0x4e7f25('0xb')](_0x53a442)[_0x4e7f25('0x12')](function(_0x399ec4){const _0x593032=_0x4e7f25;return _0x5a8c81['count']=_0x399ec4,_0x1d2c6f[_0x593032('0x9')]['includeAll']&&(_0x4d8d76[_0x593032('0x15')]=[{'all':!![]}]),db[_0x593032('0xe')][_0x593032('0x5')](_0x4d8d76);})['then'](function(_0x549807){const _0x48e806=_0x4e7f25;return _0x5a8c81[_0x48e806('0x19')]=_0x549807,_0x5a8c81;})[_0x4e7f25('0x12')](respondWithFilteredResult(_0x564b8b,_0x4d8d76))[_0x4e7f25('0x2')](handleError(_0x564b8b,null));},exports[_0x91c1cf('0x20')]=function(_0x11e305,_0x3c1d02){const _0x4f697f=_0x91c1cf;let _0x21279a={'raw':!![],'where':{'id':_0x11e305[_0x4f697f('0x29')]['id']}};const _0x475784={};return _0x475784['model']=_[_0x4f697f('0xa')](db[_0x4f697f('0xe')]['rawAttributes']),_0x475784[_0x4f697f('0x9')]=_[_0x4f697f('0xa')](_0x11e305['query']),_0x475784[_0x4f697f('0x8')]=_[_0x4f697f('0xd')](_0x475784['model'],_0x475784[_0x4f697f('0x9')]),_0x21279a[_0x4f697f('0x13')]=_['intersection'](_0x475784[_0x4f697f('0x11')],qs['fields'](_0x11e305['query'][_0x4f697f('0x2d')])),_0x21279a[_0x4f697f('0x13')]=_0x21279a[_0x4f697f('0x13')][_0x4f697f('0xf')]?_0x21279a[_0x4f697f('0x13')]:_0x475784[_0x4f697f('0x11')],_0x11e305[_0x4f697f('0x9')][_0x4f697f('0x3')]&&(_0x21279a[_0x4f697f('0x15')]=[{'all':!![]}]),_0x21279a=_[_0x4f697f('0x26')]({},_0x21279a,_0x11e305['options']),db['FaxQueueReport'][_0x4f697f('0x22')](_0x21279a)[_0x4f697f('0x12')](handleEntityNotFound(_0x3c1d02,null))['then'](respondWithResult(_0x3c1d02,null))[_0x4f697f('0x2')](handleError(_0x3c1d02,null));},exports[_0x91c1cf('0x1f')]=function(_0x3b7bce,_0x520498){const _0x255c60=_0x91c1cf;return db[_0x255c60('0xe')][_0x255c60('0x1f')](_0x3b7bce['body'],{})[_0x255c60('0x12')](respondWithResult(_0x520498,0xc9))['catch'](handleError(_0x520498,null));},exports[_0x91c1cf('0x10')]=function(_0x23b004,_0x28c43d){const _0x2d740b=_0x91c1cf;return _0x23b004[_0x2d740b('0x0')]['id']&&delete _0x23b004[_0x2d740b('0x0')]['id'],db[_0x2d740b('0xe')][_0x2d740b('0x22')]({'where':{'id':_0x23b004[_0x2d740b('0x29')]['id']}})[_0x2d740b('0x12')](handleEntityNotFound(_0x28c43d,null))[_0x2d740b('0x12')](saveUpdates(_0x23b004[_0x2d740b('0x0')],null))[_0x2d740b('0x12')](respondWithResult(_0x28c43d,null))['catch'](handleError(_0x28c43d,null));},exports[_0x91c1cf('0x28')]=function(_0x1e757c,_0x34ec49){const _0x2971d5=_0x91c1cf;return db[_0x2971d5('0xe')][_0x2971d5('0x22')]({'where':{'id':_0x1e757c[_0x2971d5('0x29')]['id']}})[_0x2971d5('0x12')](handleEntityNotFound(_0x34ec49,null))['then'](removeEntity(_0x34ec49,null))[_0x2971d5('0x2')](handleError(_0x34ec49,null));},exports[_0x91c1cf('0x32')]=function(_0x58d444,_0x4c4f19){const _0xea3a4d=_0x91c1cf;return db['FaxQueueReport'][_0xea3a4d('0x32')]()[_0xea3a4d('0x12')](respondWithResult(_0x4c4f19,null))[_0xea3a4d('0x2')](handleError(_0x4c4f19,null));};
\ No newline at end of file