Built motion from commit 5fcd269f5146f10cf3129722d518881dfac64576. Version 3.0.0...
[motion-next.git] / server / api / mailSubstatus / mailSubstatus.controller.js
index 6903de2..ee88125 100644 (file)
@@ -1 +1 @@
-const a440_0x1a6c=['sort','undefined','findOne','fieldName','params','sequelize','name','include','query','like','catch','limit','keys','includeAll','update','end','VIRTUAL','stack','intersection','rows','options','count','lodash','json','nolimit','api','then','fields','../../mysqldb','destroy','where','filters','rawAttributes','MailSubstatus','offset','sendStatus','length','order','merge','set','status','../../components/parsers/qs','attributes','filter','key','model','map','body','describe','findAll','type'];(function(_0x2e9ab8,_0x1a6cab){const _0x12e046=function(_0x3c2a49){while(--_0x3c2a49){_0x2e9ab8['push'](_0x2e9ab8['shift']());}};_0x12e046(++_0x1a6cab);}(a440_0x1a6c,0xcf));const a440_0x12e0=function(_0x2e9ab8,_0x1a6cab){_0x2e9ab8=_0x2e9ab8-0x0;let _0x12e046=a440_0x1a6c[_0x2e9ab8];return _0x12e046;};const _0x2e51e5=a440_0x12e0;'use strict';const _=require(_0x2e51e5('0x13')),qs=require(_0x2e51e5('0x26')),logger=require('../../config/logger')(_0x2e51e5('0x16')),db=require(_0x2e51e5('0x19'))['db'],{Op}=require(_0x2e51e5('0x2'));function respondWithResult(_0x3c2a49,_0xfc646a){return _0xfc646a=_0xfc646a||0xc8,function(_0x5e2204){const _0x375a15=a440_0x12e0;if(_0x5e2204)return _0x3c2a49[_0x375a15('0x25')](_0xfc646a)['json'](_0x5e2204);};}function respondWithFilteredResult(_0x898cf5,_0x53dd09){return function(_0x276b72){const _0x37f93e=a440_0x12e0;if(_0x276b72){const _0x3b7b63=_0x276b72[_0x37f93e('0x12')],_0xa4a5b3=_0x53dd09[_0x37f93e('0x1f')];let _0x50d432=_0x53dd09[_0x37f93e('0x1f')]+_0x53dd09[_0x37f93e('0x8')],_0x3e75b6;return _0x50d432>=_0x3b7b63?(_0x50d432=_0x3b7b63,_0x3e75b6=0xc8):_0x3e75b6=0xce,_0x898cf5[_0x37f93e('0x25')](_0x3e75b6),_0x898cf5[_0x37f93e('0x24')]('Content-Range',_0xa4a5b3+'-'+_0x50d432+'/'+_0x3b7b63)[_0x37f93e('0x14')](_0x276b72);}return null;};}function saveUpdates(_0x2b9b13){return function(_0x20acb3){const _0x2f505f=a440_0x12e0;if(_0x20acb3)return _0x20acb3[_0x2f505f('0xb')](_0x2b9b13)['then'](function(_0x527caf){return _0x527caf;});return null;};}function removeEntity(_0x566f36){return function(_0xe4afd2){const _0x1e9463=a440_0x12e0;if(_0xe4afd2)return _0xe4afd2['destroy']()[_0x1e9463('0x17')](function(){const _0x467a9a=_0x1e9463;_0x566f36[_0x467a9a('0x25')](0xcc)[_0x467a9a('0xc')]();});};}function handleEntityNotFound(_0x25f7ca){return function(_0x509e1f){const _0x2fc10c=a440_0x12e0;return!_0x509e1f&&_0x25f7ca[_0x2fc10c('0x20')](0x194),_0x509e1f;};}function handleError(_0x4a46e6,_0xb26cd3){return _0xb26cd3=_0xb26cd3||0x1f4,function(_0x10ddd2){const _0x28c0f0=a440_0x12e0;logger['error'](_0x10ddd2[_0x28c0f0('0xe')]),_0x10ddd2['name']&&delete _0x10ddd2[_0x28c0f0('0x3')],_0x4a46e6['status'](_0xb26cd3)['send'](_0x10ddd2);};}exports['index']=function(_0x72ac5f,_0x32ebaf){const _0x32288d=_0x2e51e5;let _0x18c3fd={};const _0x521732={},_0x1358eb={'count':0x0,'rows':[]},_0x4a5d6f=_[_0x32288d('0x2b')](db[_0x32288d('0x1e')][_0x32288d('0x1d')],function(_0x6bc801){const _0x2a0ee6=_0x32288d;return{'name':_0x6bc801[_0x2a0ee6('0x0')],'type':_0x6bc801['type'][_0x2a0ee6('0x29')]};});_0x521732[_0x32288d('0x2a')]=_[_0x32288d('0x2b')](_0x4a5d6f,_0x32288d('0x3')),_0x521732[_0x32288d('0x5')]=_[_0x32288d('0x9')](_0x72ac5f[_0x32288d('0x5')]),_0x521732[_0x32288d('0x1c')]=_[_0x32288d('0xf')](_0x521732[_0x32288d('0x2a')],_0x521732['query']),_0x18c3fd[_0x32288d('0x27')]=_[_0x32288d('0xf')](_0x521732[_0x32288d('0x2a')],qs[_0x32288d('0x18')](_0x72ac5f[_0x32288d('0x5')][_0x32288d('0x18')])),_0x18c3fd[_0x32288d('0x27')]=_0x18c3fd[_0x32288d('0x27')]['length']?_0x18c3fd[_0x32288d('0x27')]:_0x521732[_0x32288d('0x2a')];typeof _0x72ac5f[_0x32288d('0x5')][_0x32288d('0x15')]===_0x32288d('0x31')&&(_0x18c3fd[_0x32288d('0x8')]=qs[_0x32288d('0x8')](_0x72ac5f[_0x32288d('0x5')][_0x32288d('0x8')]),_0x18c3fd['offset']=qs[_0x32288d('0x1f')](_0x72ac5f[_0x32288d('0x5')]['offset']));_0x18c3fd[_0x32288d('0x22')]=qs[_0x32288d('0x30')](_0x72ac5f[_0x32288d('0x5')][_0x32288d('0x30')]),_0x18c3fd[_0x32288d('0x1b')]=qs[_0x32288d('0x1c')](_['pick'](_0x72ac5f['query'],_0x521732[_0x32288d('0x1c')]),_0x4a5d6f);_0x72ac5f[_0x32288d('0x5')]['filter']&&(_0x18c3fd[_0x32288d('0x1b')]=_[_0x32288d('0x23')](_0x18c3fd[_0x32288d('0x1b')],{[Op['or']]:_[_0x32288d('0x2b')](_0x4a5d6f,function(_0x3b2079){const _0x376446=_0x32288d;if(_0x3b2079[_0x376446('0x2f')]!==_0x376446('0xd')){const _0x145495={};return _0x145495[_0x3b2079['name']]={[Op[_0x376446('0x6')]]:'%'+_0x72ac5f[_0x376446('0x5')][_0x376446('0x28')]+'%'},_0x145495;}})}));_0x18c3fd=_[_0x32288d('0x23')]({},_0x18c3fd,_0x72ac5f[_0x32288d('0x11')]);const _0x33a571={'where':_0x18c3fd[_0x32288d('0x1b')]};return db['MailSubstatus'][_0x32288d('0x12')](_0x33a571)[_0x32288d('0x17')](function(_0x5c094d){const _0xe22751=_0x32288d;return _0x1358eb['count']=_0x5c094d,_0x72ac5f[_0xe22751('0x5')][_0xe22751('0xa')]&&(_0x18c3fd[_0xe22751('0x4')]=[{'all':!![]}]),db[_0xe22751('0x1e')][_0xe22751('0x2e')](_0x18c3fd);})['then'](function(_0x26e4a2){const _0x5ad488=_0x32288d;return _0x1358eb[_0x5ad488('0x10')]=_0x26e4a2,_0x1358eb;})[_0x32288d('0x17')](respondWithFilteredResult(_0x32ebaf,_0x18c3fd))[_0x32288d('0x7')](handleError(_0x32ebaf,null));},exports['show']=function(_0x3aa54c,_0x55fbed){const _0x2d4612=_0x2e51e5;let _0x41cdff={'raw':!![],'where':{'id':_0x3aa54c[_0x2d4612('0x1')]['id']}};const _0x38e99a={};return _0x38e99a[_0x2d4612('0x2a')]=_['keys'](db[_0x2d4612('0x1e')][_0x2d4612('0x1d')]),_0x38e99a[_0x2d4612('0x5')]=_[_0x2d4612('0x9')](_0x3aa54c[_0x2d4612('0x5')]),_0x38e99a['filters']=_[_0x2d4612('0xf')](_0x38e99a['model'],_0x38e99a[_0x2d4612('0x5')]),_0x41cdff[_0x2d4612('0x27')]=_[_0x2d4612('0xf')](_0x38e99a[_0x2d4612('0x2a')],qs['fields'](_0x3aa54c[_0x2d4612('0x5')][_0x2d4612('0x18')])),_0x41cdff[_0x2d4612('0x27')]=_0x41cdff[_0x2d4612('0x27')][_0x2d4612('0x21')]?_0x41cdff['attributes']:_0x38e99a[_0x2d4612('0x2a')],_0x3aa54c[_0x2d4612('0x5')][_0x2d4612('0xa')]&&(_0x41cdff[_0x2d4612('0x4')]=[{'all':!![]}]),_0x41cdff=_[_0x2d4612('0x23')]({},_0x41cdff,_0x3aa54c['options']),db[_0x2d4612('0x1e')][_0x2d4612('0x32')](_0x41cdff)['then'](handleEntityNotFound(_0x55fbed,null))[_0x2d4612('0x17')](respondWithResult(_0x55fbed,null))['catch'](handleError(_0x55fbed,null));},exports['create']=function(_0x2823d4,_0x135e69){const _0x4ad91f=_0x2e51e5;return db[_0x4ad91f('0x1e')]['create'](_0x2823d4[_0x4ad91f('0x2c')],{})[_0x4ad91f('0x17')](respondWithResult(_0x135e69,0xc9))[_0x4ad91f('0x7')](handleError(_0x135e69,null));},exports[_0x2e51e5('0xb')]=function(_0x161d98,_0xf26165){const _0x2e79a8=_0x2e51e5;return _0x161d98[_0x2e79a8('0x2c')]['id']&&delete _0x161d98['body']['id'],db[_0x2e79a8('0x1e')]['findOne']({'where':{'id':_0x161d98[_0x2e79a8('0x1')]['id']}})[_0x2e79a8('0x17')](handleEntityNotFound(_0xf26165,null))['then'](saveUpdates(_0x161d98['body'],null))[_0x2e79a8('0x17')](respondWithResult(_0xf26165,null))[_0x2e79a8('0x7')](handleError(_0xf26165,null));},exports[_0x2e51e5('0x1a')]=function(_0x2f3029,_0x176768){const _0x3dc117=_0x2e51e5;return db[_0x3dc117('0x1e')][_0x3dc117('0x32')]({'where':{'id':_0x2f3029[_0x3dc117('0x1')]['id']}})['then'](handleEntityNotFound(_0x176768,null))[_0x3dc117('0x17')](removeEntity(_0x176768,null))[_0x3dc117('0x7')](handleError(_0x176768,null));},exports[_0x2e51e5('0x2d')]=function(_0x1a5437,_0x5c8ac2){const _0xc7e465=_0x2e51e5;return db[_0xc7e465('0x1e')][_0xc7e465('0x2d')]()[_0xc7e465('0x17')](respondWithResult(_0x5c8ac2,null))[_0xc7e465('0x7')](handleError(_0x5c8ac2,null));};
\ No newline at end of file
+const a440_0x5cad=['where','undefined','attributes','model','type','query','create','destroy','../../mysqldb','merge','MailSubstatus','like','limit','offset','sendStatus','then','filter','pick','intersection','options','api','fields','filters','describe','rawAttributes','map','../../config/logger','params','key','includeAll','findOne','update','keys','send','nolimit','name','end','json','body','../../components/parsers/qs','status','count','catch','length','set','VIRTUAL','sequelize','sort','order'];(function(_0x5199b5,_0x5cad4a){const _0x1fc4ff=function(_0x1da7ae){while(--_0x1da7ae){_0x5199b5['push'](_0x5199b5['shift']());}};_0x1fc4ff(++_0x5cad4a);}(a440_0x5cad,0x113));const a440_0x1fc4=function(_0x5199b5,_0x5cad4a){_0x5199b5=_0x5199b5-0x0;let _0x1fc4ff=a440_0x5cad[_0x5199b5];return _0x1fc4ff;};const _0x22e245=a440_0x1fc4;'use strict';const _=require('lodash'),qs=require(_0x22e245('0x9')),logger=require(_0x22e245('0x2d'))(_0x22e245('0x27')),db=require(_0x22e245('0x1b'))['db'],{Op}=require(_0x22e245('0x10'));function respondWithResult(_0x1da7ae,_0x5000a8){return _0x5000a8=_0x5000a8||0xc8,function(_0x12b3c0){const _0x1786c0=a440_0x1fc4;if(_0x12b3c0)return _0x1da7ae[_0x1786c0('0xa')](_0x5000a8)[_0x1786c0('0x7')](_0x12b3c0);};}function respondWithFilteredResult(_0x4a11d0,_0x2e1bb6){return function(_0x34ce58){const _0xe6214d=a440_0x1fc4;if(_0x34ce58){const _0x425341=_0x34ce58[_0xe6214d('0xb')],_0x45250c=_0x2e1bb6[_0xe6214d('0x20')];let _0x8b9e6e=_0x2e1bb6[_0xe6214d('0x20')]+_0x2e1bb6['limit'],_0x57d3da;return _0x8b9e6e>=_0x425341?(_0x8b9e6e=_0x425341,_0x57d3da=0xc8):_0x57d3da=0xce,_0x4a11d0[_0xe6214d('0xa')](_0x57d3da),_0x4a11d0[_0xe6214d('0xe')]('Content-Range',_0x45250c+'-'+_0x8b9e6e+'/'+_0x425341)[_0xe6214d('0x7')](_0x34ce58);}return null;};}function saveUpdates(_0x5226e4){return function(_0x309eba){const _0x1d307d=a440_0x1fc4;if(_0x309eba)return _0x309eba[_0x1d307d('0x1')](_0x5226e4)[_0x1d307d('0x22')](function(_0x12cf67){return _0x12cf67;});return null;};}function removeEntity(_0x5ba94c){return function(_0x5e97cc){const _0x5130f8=a440_0x1fc4;if(_0x5e97cc)return _0x5e97cc[_0x5130f8('0x1a')]()[_0x5130f8('0x22')](function(){const _0x495936=_0x5130f8;_0x5ba94c[_0x495936('0xa')](0xcc)[_0x495936('0x6')]();});};}function handleEntityNotFound(_0x260bd2){return function(_0x9f4b55){const _0x10d719=a440_0x1fc4;return!_0x9f4b55&&_0x260bd2[_0x10d719('0x21')](0x194),_0x9f4b55;};}function handleError(_0x153a4a,_0x53777f){return _0x53777f=_0x53777f||0x1f4,function(_0x36aee5){const _0x244bc1=a440_0x1fc4;logger['error'](_0x36aee5['stack']),_0x36aee5['name']&&delete _0x36aee5[_0x244bc1('0x5')],_0x153a4a[_0x244bc1('0xa')](_0x53777f)[_0x244bc1('0x3')](_0x36aee5);};}exports['index']=function(_0x577ff4,_0x599a89){const _0x9cceb3=_0x22e245;let _0x211844={};const _0x52b09a={},_0x192ff2={'count':0x0,'rows':[]},_0x479a36=_[_0x9cceb3('0x2c')](db[_0x9cceb3('0x1d')][_0x9cceb3('0x2b')],function(_0x4449be){const _0x5464aa=_0x9cceb3;return{'name':_0x4449be['fieldName'],'type':_0x4449be[_0x5464aa('0x17')][_0x5464aa('0x2f')]};});_0x52b09a[_0x9cceb3('0x16')]=_[_0x9cceb3('0x2c')](_0x479a36,_0x9cceb3('0x5')),_0x52b09a[_0x9cceb3('0x18')]=_[_0x9cceb3('0x2')](_0x577ff4[_0x9cceb3('0x18')]),_0x52b09a[_0x9cceb3('0x29')]=_[_0x9cceb3('0x25')](_0x52b09a[_0x9cceb3('0x16')],_0x52b09a[_0x9cceb3('0x18')]),_0x211844['attributes']=_['intersection'](_0x52b09a[_0x9cceb3('0x16')],qs[_0x9cceb3('0x28')](_0x577ff4['query'][_0x9cceb3('0x28')])),_0x211844[_0x9cceb3('0x15')]=_0x211844['attributes'][_0x9cceb3('0xd')]?_0x211844[_0x9cceb3('0x15')]:_0x52b09a[_0x9cceb3('0x16')];typeof _0x577ff4[_0x9cceb3('0x18')][_0x9cceb3('0x4')]===_0x9cceb3('0x14')&&(_0x211844[_0x9cceb3('0x1f')]=qs['limit'](_0x577ff4[_0x9cceb3('0x18')][_0x9cceb3('0x1f')]),_0x211844[_0x9cceb3('0x20')]=qs[_0x9cceb3('0x20')](_0x577ff4[_0x9cceb3('0x18')][_0x9cceb3('0x20')]));_0x211844[_0x9cceb3('0x12')]=qs[_0x9cceb3('0x11')](_0x577ff4[_0x9cceb3('0x18')]['sort']),_0x211844[_0x9cceb3('0x13')]=qs[_0x9cceb3('0x29')](_[_0x9cceb3('0x24')](_0x577ff4[_0x9cceb3('0x18')],_0x52b09a[_0x9cceb3('0x29')]),_0x479a36);_0x577ff4['query'][_0x9cceb3('0x23')]&&(_0x211844[_0x9cceb3('0x13')]=_[_0x9cceb3('0x1c')](_0x211844[_0x9cceb3('0x13')],{[Op['or']]:_[_0x9cceb3('0x2c')](_0x479a36,function(_0x5b4806){const _0x44f116=_0x9cceb3;if(_0x5b4806[_0x44f116('0x17')]!==_0x44f116('0xf')){const _0x19f120={};return _0x19f120[_0x5b4806[_0x44f116('0x5')]]={[Op[_0x44f116('0x1e')]]:'%'+_0x577ff4[_0x44f116('0x18')][_0x44f116('0x23')]+'%'},_0x19f120;}})}));_0x211844=_[_0x9cceb3('0x1c')]({},_0x211844,_0x577ff4[_0x9cceb3('0x26')]);const _0x3aaf8d={'where':_0x211844['where']};return db[_0x9cceb3('0x1d')][_0x9cceb3('0xb')](_0x3aaf8d)[_0x9cceb3('0x22')](function(_0x10a257){const _0x27d86b=_0x9cceb3;return _0x192ff2['count']=_0x10a257,_0x577ff4['query']['includeAll']&&(_0x211844['include']=[{'all':!![]}]),db[_0x27d86b('0x1d')]['findAll'](_0x211844);})[_0x9cceb3('0x22')](function(_0x30a9fa){return _0x192ff2['rows']=_0x30a9fa,_0x192ff2;})[_0x9cceb3('0x22')](respondWithFilteredResult(_0x599a89,_0x211844))[_0x9cceb3('0xc')](handleError(_0x599a89,null));},exports['show']=function(_0x562d4d,_0xf395c8){const _0x3fdaa1=_0x22e245;let _0x449bc9={'raw':!![],'where':{'id':_0x562d4d[_0x3fdaa1('0x2e')]['id']}};const _0x21ea4d={};return _0x21ea4d['model']=_[_0x3fdaa1('0x2')](db[_0x3fdaa1('0x1d')][_0x3fdaa1('0x2b')]),_0x21ea4d[_0x3fdaa1('0x18')]=_[_0x3fdaa1('0x2')](_0x562d4d[_0x3fdaa1('0x18')]),_0x21ea4d[_0x3fdaa1('0x29')]=_[_0x3fdaa1('0x25')](_0x21ea4d[_0x3fdaa1('0x16')],_0x21ea4d[_0x3fdaa1('0x18')]),_0x449bc9['attributes']=_[_0x3fdaa1('0x25')](_0x21ea4d['model'],qs[_0x3fdaa1('0x28')](_0x562d4d[_0x3fdaa1('0x18')][_0x3fdaa1('0x28')])),_0x449bc9[_0x3fdaa1('0x15')]=_0x449bc9[_0x3fdaa1('0x15')]['length']?_0x449bc9[_0x3fdaa1('0x15')]:_0x21ea4d['model'],_0x562d4d['query'][_0x3fdaa1('0x30')]&&(_0x449bc9['include']=[{'all':!![]}]),_0x449bc9=_[_0x3fdaa1('0x1c')]({},_0x449bc9,_0x562d4d[_0x3fdaa1('0x26')]),db[_0x3fdaa1('0x1d')]['findOne'](_0x449bc9)['then'](handleEntityNotFound(_0xf395c8,null))[_0x3fdaa1('0x22')](respondWithResult(_0xf395c8,null))['catch'](handleError(_0xf395c8,null));},exports[_0x22e245('0x19')]=function(_0x246be6,_0x45ddf7){const _0x124cf8=_0x22e245;return db['MailSubstatus'][_0x124cf8('0x19')](_0x246be6[_0x124cf8('0x8')],{})[_0x124cf8('0x22')](respondWithResult(_0x45ddf7,0xc9))[_0x124cf8('0xc')](handleError(_0x45ddf7,null));},exports[_0x22e245('0x1')]=function(_0x11ff6d,_0x5bf534){const _0x3655de=_0x22e245;return _0x11ff6d[_0x3655de('0x8')]['id']&&delete _0x11ff6d[_0x3655de('0x8')]['id'],db[_0x3655de('0x1d')][_0x3655de('0x0')]({'where':{'id':_0x11ff6d[_0x3655de('0x2e')]['id']}})['then'](handleEntityNotFound(_0x5bf534,null))[_0x3655de('0x22')](saveUpdates(_0x11ff6d[_0x3655de('0x8')],null))[_0x3655de('0x22')](respondWithResult(_0x5bf534,null))[_0x3655de('0xc')](handleError(_0x5bf534,null));},exports['destroy']=function(_0x4a8327,_0x4e707d){const _0x20430f=_0x22e245;return db[_0x20430f('0x1d')][_0x20430f('0x0')]({'where':{'id':_0x4a8327[_0x20430f('0x2e')]['id']}})['then'](handleEntityNotFound(_0x4e707d,null))[_0x20430f('0x22')](removeEntity(_0x4e707d,null))['catch'](handleError(_0x4e707d,null));},exports[_0x22e245('0x2a')]=function(_0x5b87da,_0x331de6){const _0x19ff9a=_0x22e245;return db[_0x19ff9a('0x1d')][_0x19ff9a('0x2a')]()[_0x19ff9a('0x22')](respondWithResult(_0x331de6,null))[_0x19ff9a('0xc')](handleError(_0x331de6,null));};
\ No newline at end of file