Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / api / faxQueueReport / faxQueueReport.controller.js
index 42da15c..f853332 100644 (file)
@@ -1 +1 @@
-const a219_0x5348=['create','pick','sequelize','status','stack','type','findOne','limit','map','length','merge','undefined','../../mysqldb','body','keys','name','catch','FaxQueueReport','key','model','update','send','offset','count','then','filters','rows','../../components/parsers/qs','../../config/logger','lodash','attributes','fields','filter','where','sort','findAll','VIRTUAL','order','includeAll','Content-Range','include','intersection','fieldName','json','rawAttributes','describe','set','index','destroy','options','params','query','error'];(function(_0x26a666,_0x53485a){const _0x19ac0d=function(_0x2c6877){while(--_0x2c6877){_0x26a666['push'](_0x26a666['shift']());}};_0x19ac0d(++_0x53485a);}(a219_0x5348,0x16b));const a219_0x19ac=function(_0x26a666,_0x53485a){_0x26a666=_0x26a666-0x0;let _0x19ac0d=a219_0x5348[_0x26a666];return _0x19ac0d;};const _0x2f476a=a219_0x19ac;'use strict';const _=require(_0x2f476a('0x25')),qs=require(_0x2f476a('0x23')),logger=require(_0x2f476a('0x24'))('api'),db=require(_0x2f476a('0x14'))['db'],{Op}=require(_0x2f476a('0xa'));function respondWithResult(_0x2c6877,_0x244b6b){return _0x244b6b=_0x244b6b||0xc8,function(_0x19a764){const _0x3bb8f9=a219_0x19ac;if(_0x19a764)return _0x2c6877['status'](_0x244b6b)[_0x3bb8f9('0x33')](_0x19a764);};}function respondWithFilteredResult(_0x3fb0e8,_0x295f97){return function(_0x183c8c){const _0xcc7a81=a219_0x19ac;if(_0x183c8c){const _0x55d415=_0x183c8c[_0xcc7a81('0x1f')],_0x496ae9=_0x295f97[_0xcc7a81('0x1e')];let _0x254f3c=_0x295f97['offset']+_0x295f97['limit'],_0x3cff33;return _0x254f3c>=_0x55d415?(_0x254f3c=_0x55d415,_0x3cff33=0xc8):_0x3cff33=0xce,_0x3fb0e8['status'](_0x3cff33),_0x3fb0e8[_0xcc7a81('0x1')](_0xcc7a81('0x2f'),_0x496ae9+'-'+_0x254f3c+'/'+_0x55d415)[_0xcc7a81('0x33')](_0x183c8c);}return null;};}function saveUpdates(_0xb96e98){return function(_0xa3dac2){const _0x2e1710=a219_0x19ac;if(_0xa3dac2)return _0xa3dac2[_0x2e1710('0x1c')](_0xb96e98)[_0x2e1710('0x20')](function(_0x4f5546){return _0x4f5546;});return null;};}function removeEntity(_0x52c046){return function(_0x3743c7){if(_0x3743c7)return _0x3743c7['destroy']()['then'](function(){const _0x768e8d=a219_0x19ac;_0x52c046[_0x768e8d('0xb')](0xcc)['end']();});};}function handleEntityNotFound(_0x21facf){return function(_0x5e28f1){return!_0x5e28f1&&_0x21facf['sendStatus'](0x194),_0x5e28f1;};}function handleError(_0x521a35,_0x519804){return _0x519804=_0x519804||0x1f4,function(_0xdf2ae9){const _0x44acc5=a219_0x19ac;logger[_0x44acc5('0x7')](_0xdf2ae9[_0x44acc5('0xc')]),_0xdf2ae9[_0x44acc5('0x17')]&&delete _0xdf2ae9[_0x44acc5('0x17')],_0x521a35['status'](_0x519804)[_0x44acc5('0x1d')](_0xdf2ae9);};}exports[_0x2f476a('0x2')]=function(_0x1be810,_0xb75214){const _0x1f210a=_0x2f476a;let _0x54cf81={};const _0x44f5d5={},_0x438645={'count':0x0,'rows':[]},_0x15635b=_['map'](db[_0x1f210a('0x19')][_0x1f210a('0x34')],function(_0x3e1735){const _0x918c13=_0x1f210a;return{'name':_0x3e1735[_0x918c13('0x32')],'type':_0x3e1735['type'][_0x918c13('0x1a')]};});_0x44f5d5[_0x1f210a('0x1b')]=_[_0x1f210a('0x10')](_0x15635b,_0x1f210a('0x17')),_0x44f5d5['query']=_[_0x1f210a('0x16')](_0x1be810[_0x1f210a('0x6')]),_0x44f5d5[_0x1f210a('0x21')]=_[_0x1f210a('0x31')](_0x44f5d5[_0x1f210a('0x1b')],_0x44f5d5[_0x1f210a('0x6')]),_0x54cf81['attributes']=_[_0x1f210a('0x31')](_0x44f5d5[_0x1f210a('0x1b')],qs[_0x1f210a('0x27')](_0x1be810['query'][_0x1f210a('0x27')])),_0x54cf81['attributes']=_0x54cf81[_0x1f210a('0x26')]['length']?_0x54cf81[_0x1f210a('0x26')]:_0x44f5d5[_0x1f210a('0x1b')];typeof _0x1be810[_0x1f210a('0x6')]['nolimit']===_0x1f210a('0x13')&&(_0x54cf81[_0x1f210a('0xf')]=qs[_0x1f210a('0xf')](_0x1be810['query']['limit']),_0x54cf81['offset']=qs[_0x1f210a('0x1e')](_0x1be810['query'][_0x1f210a('0x1e')]));_0x54cf81[_0x1f210a('0x2d')]=qs[_0x1f210a('0x2a')](_0x1be810[_0x1f210a('0x6')]['sort']),_0x54cf81[_0x1f210a('0x29')]=qs['filters'](_[_0x1f210a('0x9')](_0x1be810[_0x1f210a('0x6')],_0x44f5d5[_0x1f210a('0x21')]),_0x15635b);_0x1be810[_0x1f210a('0x6')][_0x1f210a('0x28')]&&(_0x54cf81[_0x1f210a('0x29')]=_['merge'](_0x54cf81[_0x1f210a('0x29')],{[Op['or']]:_[_0x1f210a('0x10')](_0x15635b,function(_0x3209a5){const _0x42e32b=_0x1f210a;if(_0x3209a5[_0x42e32b('0xd')]!==_0x42e32b('0x2c')){const _0x5f56a0={};return _0x5f56a0[_0x3209a5[_0x42e32b('0x17')]]={[Op['like']]:'%'+_0x1be810[_0x42e32b('0x6')][_0x42e32b('0x28')]+'%'},_0x5f56a0;}})}));_0x54cf81=_[_0x1f210a('0x12')]({},_0x54cf81,_0x1be810[_0x1f210a('0x4')]);const _0xb3e1ef={'where':_0x54cf81[_0x1f210a('0x29')]};return db['FaxQueueReport'][_0x1f210a('0x1f')](_0xb3e1ef)['then'](function(_0x545fb3){const _0x414d40=_0x1f210a;return _0x438645[_0x414d40('0x1f')]=_0x545fb3,_0x1be810[_0x414d40('0x6')][_0x414d40('0x2e')]&&(_0x54cf81[_0x414d40('0x30')]=[{'all':!![]}]),db[_0x414d40('0x19')][_0x414d40('0x2b')](_0x54cf81);})[_0x1f210a('0x20')](function(_0x1bbead){const _0x21f245=_0x1f210a;return _0x438645[_0x21f245('0x22')]=_0x1bbead,_0x438645;})['then'](respondWithFilteredResult(_0xb75214,_0x54cf81))[_0x1f210a('0x18')](handleError(_0xb75214,null));},exports['show']=function(_0x50cd06,_0x276975){const _0x2a96b4=_0x2f476a;let _0x981aba={'raw':!![],'where':{'id':_0x50cd06['params']['id']}};const _0x5874e7={};return _0x5874e7[_0x2a96b4('0x1b')]=_['keys'](db[_0x2a96b4('0x19')][_0x2a96b4('0x34')]),_0x5874e7[_0x2a96b4('0x6')]=_['keys'](_0x50cd06[_0x2a96b4('0x6')]),_0x5874e7[_0x2a96b4('0x21')]=_[_0x2a96b4('0x31')](_0x5874e7[_0x2a96b4('0x1b')],_0x5874e7['query']),_0x981aba[_0x2a96b4('0x26')]=_[_0x2a96b4('0x31')](_0x5874e7[_0x2a96b4('0x1b')],qs[_0x2a96b4('0x27')](_0x50cd06[_0x2a96b4('0x6')][_0x2a96b4('0x27')])),_0x981aba['attributes']=_0x981aba[_0x2a96b4('0x26')][_0x2a96b4('0x11')]?_0x981aba[_0x2a96b4('0x26')]:_0x5874e7['model'],_0x50cd06[_0x2a96b4('0x6')][_0x2a96b4('0x2e')]&&(_0x981aba[_0x2a96b4('0x30')]=[{'all':!![]}]),_0x981aba=_[_0x2a96b4('0x12')]({},_0x981aba,_0x50cd06[_0x2a96b4('0x4')]),db['FaxQueueReport'][_0x2a96b4('0xe')](_0x981aba)[_0x2a96b4('0x20')](handleEntityNotFound(_0x276975,null))[_0x2a96b4('0x20')](respondWithResult(_0x276975,null))[_0x2a96b4('0x18')](handleError(_0x276975,null));},exports[_0x2f476a('0x8')]=function(_0x333cf5,_0x2ecf0d){const _0x33a78d=_0x2f476a;return db[_0x33a78d('0x19')][_0x33a78d('0x8')](_0x333cf5[_0x33a78d('0x15')],{})['then'](respondWithResult(_0x2ecf0d,0xc9))[_0x33a78d('0x18')](handleError(_0x2ecf0d,null));},exports[_0x2f476a('0x1c')]=function(_0x22663b,_0x21778e){const _0x5b02c8=_0x2f476a;return _0x22663b[_0x5b02c8('0x15')]['id']&&delete _0x22663b[_0x5b02c8('0x15')]['id'],db[_0x5b02c8('0x19')][_0x5b02c8('0xe')]({'where':{'id':_0x22663b['params']['id']}})[_0x5b02c8('0x20')](handleEntityNotFound(_0x21778e,null))[_0x5b02c8('0x20')](saveUpdates(_0x22663b[_0x5b02c8('0x15')],null))[_0x5b02c8('0x20')](respondWithResult(_0x21778e,null))[_0x5b02c8('0x18')](handleError(_0x21778e,null));},exports[_0x2f476a('0x3')]=function(_0x41b63d,_0x335bee){const _0x5bec1c=_0x2f476a;return db['FaxQueueReport'][_0x5bec1c('0xe')]({'where':{'id':_0x41b63d[_0x5bec1c('0x5')]['id']}})[_0x5bec1c('0x20')](handleEntityNotFound(_0x335bee,null))['then'](removeEntity(_0x335bee,null))[_0x5bec1c('0x18')](handleError(_0x335bee,null));},exports[_0x2f476a('0x0')]=function(_0xd0f7fe,_0x2b8a1b){const _0x4ce456=_0x2f476a;return db[_0x4ce456('0x19')][_0x4ce456('0x0')]()[_0x4ce456('0x20')](respondWithResult(_0x2b8a1b,null))[_0x4ce456('0x18')](handleError(_0x2b8a1b,null));};
\ No newline at end of file
+const a219_0x3b6b=['query','Content-Range','send','then','intersection','keys','like','../../mysqldb','offset','limit','findOne','key','describe','model','count','type','map','nolimit','FaxQueueReport','show','sendStatus','options','include','error','filters','body','VIRTUAL','fields','filter','update','catch','set','undefined','length','name','../../config/logger','merge','includeAll','attributes','where','sort','status','fieldName','../../components/parsers/qs','findAll','index','sequelize','rawAttributes','params'];(function(_0x34cf40,_0x3b6b0a){const _0x55abe6=function(_0x34632a){while(--_0x34632a){_0x34cf40['push'](_0x34cf40['shift']());}};_0x55abe6(++_0x3b6b0a);}(a219_0x3b6b,0xe7));const a219_0x55ab=function(_0x34cf40,_0x3b6b0a){_0x34cf40=_0x34cf40-0x0;let _0x55abe6=a219_0x3b6b[_0x34cf40];return _0x55abe6;};const _0x42d3fd=a219_0x55ab;'use strict';const _=require('lodash'),qs=require(_0x42d3fd('0x8')),logger=require(_0x42d3fd('0x0'))('api'),db=require(_0x42d3fd('0x15'))['db'],{Op}=require(_0x42d3fd('0xb'));function respondWithResult(_0x34632a,_0x4c21fe){return _0x4c21fe=_0x4c21fe||0xc8,function(_0xe57ea6){const _0x3cfa79=a219_0x55ab;if(_0xe57ea6)return _0x34632a[_0x3cfa79('0x6')](_0x4c21fe)['json'](_0xe57ea6);};}function respondWithFilteredResult(_0x4184a3,_0x4bfdfb){return function(_0x34bbf0){const _0x424550=a219_0x55ab;if(_0x34bbf0){const _0x19b51e=_0x34bbf0[_0x424550('0x1c')],_0x38c65f=_0x4bfdfb[_0x424550('0x16')];let _0x2abc8b=_0x4bfdfb[_0x424550('0x16')]+_0x4bfdfb[_0x424550('0x17')],_0x4d4bf7;return _0x2abc8b>=_0x19b51e?(_0x2abc8b=_0x19b51e,_0x4d4bf7=0xc8):_0x4d4bf7=0xce,_0x4184a3[_0x424550('0x6')](_0x4d4bf7),_0x4184a3[_0x424550('0x2d')](_0x424550('0xf'),_0x38c65f+'-'+_0x2abc8b+'/'+_0x19b51e)['json'](_0x34bbf0);}return null;};}function saveUpdates(_0x444331){return function(_0xb02745){const _0x17b3f8=a219_0x55ab;if(_0xb02745)return _0xb02745[_0x17b3f8('0x2b')](_0x444331)[_0x17b3f8('0x11')](function(_0x440a30){return _0x440a30;});return null;};}function removeEntity(_0x123113){return function(_0x29a544){if(_0x29a544)return _0x29a544['destroy']()['then'](function(){const _0x438ed5=a219_0x55ab;_0x123113[_0x438ed5('0x6')](0xcc)['end']();});};}function handleEntityNotFound(_0x4e53af){return function(_0x526145){const _0x552eb5=a219_0x55ab;return!_0x526145&&_0x4e53af[_0x552eb5('0x22')](0x194),_0x526145;};}function handleError(_0xfbe906,_0xd2c593){return _0xd2c593=_0xd2c593||0x1f4,function(_0x501705){const _0x853614=a219_0x55ab;logger[_0x853614('0x25')](_0x501705['stack']),_0x501705[_0x853614('0x30')]&&delete _0x501705[_0x853614('0x30')],_0xfbe906['status'](_0xd2c593)[_0x853614('0x10')](_0x501705);};}exports[_0x42d3fd('0xa')]=function(_0x14097d,_0x50b3ed){const _0xafde61=_0x42d3fd;let _0x4eadde={};const _0x2d3150={},_0x41563c={'count':0x0,'rows':[]},_0x524224=_['map'](db[_0xafde61('0x20')][_0xafde61('0xc')],function(_0x39ab3a){const _0x3f6659=_0xafde61;return{'name':_0x39ab3a[_0x3f6659('0x7')],'type':_0x39ab3a[_0x3f6659('0x1d')][_0x3f6659('0x19')]};});_0x2d3150[_0xafde61('0x1b')]=_['map'](_0x524224,_0xafde61('0x30')),_0x2d3150[_0xafde61('0xe')]=_[_0xafde61('0x13')](_0x14097d['query']),_0x2d3150[_0xafde61('0x26')]=_[_0xafde61('0x12')](_0x2d3150[_0xafde61('0x1b')],_0x2d3150[_0xafde61('0xe')]),_0x4eadde[_0xafde61('0x3')]=_['intersection'](_0x2d3150[_0xafde61('0x1b')],qs['fields'](_0x14097d[_0xafde61('0xe')][_0xafde61('0x29')])),_0x4eadde[_0xafde61('0x3')]=_0x4eadde[_0xafde61('0x3')][_0xafde61('0x2f')]?_0x4eadde[_0xafde61('0x3')]:_0x2d3150[_0xafde61('0x1b')];typeof _0x14097d[_0xafde61('0xe')][_0xafde61('0x1f')]===_0xafde61('0x2e')&&(_0x4eadde[_0xafde61('0x17')]=qs['limit'](_0x14097d['query'][_0xafde61('0x17')]),_0x4eadde[_0xafde61('0x16')]=qs[_0xafde61('0x16')](_0x14097d[_0xafde61('0xe')]['offset']));_0x4eadde['order']=qs[_0xafde61('0x5')](_0x14097d[_0xafde61('0xe')]['sort']),_0x4eadde[_0xafde61('0x4')]=qs[_0xafde61('0x26')](_['pick'](_0x14097d[_0xafde61('0xe')],_0x2d3150[_0xafde61('0x26')]),_0x524224);_0x14097d[_0xafde61('0xe')][_0xafde61('0x2a')]&&(_0x4eadde['where']=_['merge'](_0x4eadde[_0xafde61('0x4')],{[Op['or']]:_[_0xafde61('0x1e')](_0x524224,function(_0x28c398){const _0x3d1b2e=_0xafde61;if(_0x28c398[_0x3d1b2e('0x1d')]!==_0x3d1b2e('0x28')){const _0x2faa41={};return _0x2faa41[_0x28c398[_0x3d1b2e('0x30')]]={[Op[_0x3d1b2e('0x14')]]:'%'+_0x14097d['query'][_0x3d1b2e('0x2a')]+'%'},_0x2faa41;}})}));_0x4eadde=_['merge']({},_0x4eadde,_0x14097d['options']);const _0x3f42c9={'where':_0x4eadde[_0xafde61('0x4')]};return db[_0xafde61('0x20')][_0xafde61('0x1c')](_0x3f42c9)[_0xafde61('0x11')](function(_0x359121){const _0x2aa69c=_0xafde61;return _0x41563c[_0x2aa69c('0x1c')]=_0x359121,_0x14097d[_0x2aa69c('0xe')][_0x2aa69c('0x2')]&&(_0x4eadde[_0x2aa69c('0x24')]=[{'all':!![]}]),db[_0x2aa69c('0x20')][_0x2aa69c('0x9')](_0x4eadde);})[_0xafde61('0x11')](function(_0x4ff858){return _0x41563c['rows']=_0x4ff858,_0x41563c;})['then'](respondWithFilteredResult(_0x50b3ed,_0x4eadde))[_0xafde61('0x2c')](handleError(_0x50b3ed,null));},exports[_0x42d3fd('0x21')]=function(_0x503338,_0x124c67){const _0x3ff207=_0x42d3fd;let _0x14530e={'raw':!![],'where':{'id':_0x503338[_0x3ff207('0xd')]['id']}};const _0x232bd7={};return _0x232bd7[_0x3ff207('0x1b')]=_['keys'](db[_0x3ff207('0x20')][_0x3ff207('0xc')]),_0x232bd7[_0x3ff207('0xe')]=_['keys'](_0x503338['query']),_0x232bd7[_0x3ff207('0x26')]=_[_0x3ff207('0x12')](_0x232bd7[_0x3ff207('0x1b')],_0x232bd7['query']),_0x14530e['attributes']=_[_0x3ff207('0x12')](_0x232bd7[_0x3ff207('0x1b')],qs[_0x3ff207('0x29')](_0x503338[_0x3ff207('0xe')][_0x3ff207('0x29')])),_0x14530e[_0x3ff207('0x3')]=_0x14530e[_0x3ff207('0x3')]['length']?_0x14530e['attributes']:_0x232bd7[_0x3ff207('0x1b')],_0x503338['query'][_0x3ff207('0x2')]&&(_0x14530e[_0x3ff207('0x24')]=[{'all':!![]}]),_0x14530e=_[_0x3ff207('0x1')]({},_0x14530e,_0x503338[_0x3ff207('0x23')]),db[_0x3ff207('0x20')][_0x3ff207('0x18')](_0x14530e)[_0x3ff207('0x11')](handleEntityNotFound(_0x124c67,null))[_0x3ff207('0x11')](respondWithResult(_0x124c67,null))[_0x3ff207('0x2c')](handleError(_0x124c67,null));},exports['create']=function(_0x29e9e4,_0x352467){const _0x4f4149=_0x42d3fd;return db[_0x4f4149('0x20')]['create'](_0x29e9e4[_0x4f4149('0x27')],{})[_0x4f4149('0x11')](respondWithResult(_0x352467,0xc9))[_0x4f4149('0x2c')](handleError(_0x352467,null));},exports[_0x42d3fd('0x2b')]=function(_0x572c44,_0x1a1524){const _0x107a59=_0x42d3fd;return _0x572c44[_0x107a59('0x27')]['id']&&delete _0x572c44[_0x107a59('0x27')]['id'],db[_0x107a59('0x20')][_0x107a59('0x18')]({'where':{'id':_0x572c44[_0x107a59('0xd')]['id']}})['then'](handleEntityNotFound(_0x1a1524,null))[_0x107a59('0x11')](saveUpdates(_0x572c44[_0x107a59('0x27')],null))[_0x107a59('0x11')](respondWithResult(_0x1a1524,null))['catch'](handleError(_0x1a1524,null));},exports['destroy']=function(_0x373df2,_0x110334){const _0x5dd449=_0x42d3fd;return db[_0x5dd449('0x20')][_0x5dd449('0x18')]({'where':{'id':_0x373df2[_0x5dd449('0xd')]['id']}})[_0x5dd449('0x11')](handleEntityNotFound(_0x110334,null))[_0x5dd449('0x11')](removeEntity(_0x110334,null))[_0x5dd449('0x2c')](handleError(_0x110334,null));},exports[_0x42d3fd('0x1a')]=function(_0xadda6,_0x44718d){const _0x5bf378=_0x42d3fd;return db['FaxQueueReport']['describe']()[_0x5bf378('0x11')](respondWithResult(_0x44718d,null))[_0x5bf378('0x2c')](handleError(_0x44718d,null));};
\ No newline at end of file