Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / api / mailTransferReport / mailTransferReport.controller.js
index dbec6ef..59d6d26 100644 (file)
@@ -1 +1 @@
-const a534_0x2227=['findOne','body','destroy','limit','filters','api','type','fields','nolimit','merge','findAll','update','intersection','query','pick','catch','attributes','then','options','error','undefined','rawAttributes','include','count','status','describe','json','../../config/logger','includeAll','create','key','offset','order','send','params','name','lodash','stack','MailTransferReport','VIRTUAL','Content-Range','map','filter','sort','fieldName','keys','sendStatus','sequelize','model','set','where'];(function(_0x380751,_0x4f9591){const _0x22271d=function(_0x465db9){while(--_0x465db9){_0x380751['push'](_0x380751['shift']());}};_0x22271d(++_0x4f9591);}(a534_0x2227,0x152));const a534_0x465d=function(_0x380751,_0x4f9591){_0x380751=_0x380751-0xb0;let _0x22271d=a534_0x2227[_0x380751];return _0x22271d;};const a534_0x560916=a534_0x465d;'use strict';const _=require(a534_0x560916(0xb4)),qs=require('../../components/parsers/qs'),logger=require(a534_0x560916(0xde))(a534_0x560916(0xc8)),{db}=require('../../mysqldb'),{Op}=require(a534_0x560916(0xbf));function respondWithResult(_0x188ea4,_0x12e631){return _0x12e631=_0x12e631||0xc8,function(_0x4c6512){const _0x31a6f8=a534_0x465d;if(_0x4c6512)return _0x188ea4['status'](_0x12e631)[_0x31a6f8(0xdd)](_0x4c6512);};}function respondWithFilteredResult(_0x166602,_0x2f0bb4){return function(_0x97d12b){const _0x425c81=a534_0x465d;if(_0x97d12b){const _0x331419=_0x97d12b['count'],_0x4e8dcd=_0x2f0bb4[_0x425c81(0xe2)];let _0xaafa4a=_0x2f0bb4[_0x425c81(0xe2)]+_0x2f0bb4[_0x425c81(0xc6)],_0x3bd819;return _0xaafa4a>=_0x331419?(_0xaafa4a=_0x331419,_0x3bd819=0xc8):_0x3bd819=0xce,_0x166602[_0x425c81(0xdb)](_0x3bd819),_0x166602[_0x425c81(0xc1)](_0x425c81(0xb8),_0x4e8dcd+'-'+_0xaafa4a+'/'+_0x331419)[_0x425c81(0xdd)](_0x97d12b);}return null;};}function saveUpdates(_0x5a3fa4){return function(_0x4155f7){const _0x215485=a534_0x465d;if(_0x4155f7)return _0x4155f7['update'](_0x5a3fa4)[_0x215485(0xd4)](function(_0x31747a){return _0x31747a;});return null;};}function removeEntity(_0xaa9fd7){return function(_0x4070e9){const _0x3742fb=a534_0x465d;if(_0x4070e9)return _0x4070e9[_0x3742fb(0xc5)]()[_0x3742fb(0xd4)](function(){const _0x1ffabb=_0x3742fb;_0xaa9fd7[_0x1ffabb(0xdb)](0xcc)['end']();});};}function handleEntityNotFound(_0x52415c){return function(_0x2bb801){const _0x4f3379=a534_0x465d;return!_0x2bb801&&_0x52415c[_0x4f3379(0xbe)](0x194),_0x2bb801;};}function handleError(_0x2e7307,_0x40bbcb){return _0x40bbcb=_0x40bbcb||0x1f4,function(_0x24abc7){const _0x51b960=a534_0x465d;logger[_0x51b960(0xd6)](_0x24abc7[_0x51b960(0xb5)]),_0x24abc7[_0x51b960(0xb3)]&&delete _0x24abc7[_0x51b960(0xb3)],_0x2e7307[_0x51b960(0xdb)](_0x40bbcb)[_0x51b960(0xb1)](_0x24abc7);};}exports['index']=function(_0x599689,_0x54a9ff){const _0x574168=a534_0x560916;let _0x2eab47={};const _0x3f387a={},_0x43cb7e={'count':0x0,'rows':[]},_0xa83136=_[_0x574168(0xb9)](db[_0x574168(0xb6)][_0x574168(0xd8)],function(_0x5d1458){const _0x59d77f=_0x574168;return{'name':_0x5d1458[_0x59d77f(0xbc)],'type':_0x5d1458['type'][_0x59d77f(0xe1)]};});_0x3f387a[_0x574168(0xc0)]=_[_0x574168(0xb9)](_0xa83136,_0x574168(0xb3)),_0x3f387a[_0x574168(0xd0)]=_[_0x574168(0xbd)](_0x599689[_0x574168(0xd0)]),_0x3f387a[_0x574168(0xc7)]=_[_0x574168(0xcf)](_0x3f387a[_0x574168(0xc0)],_0x3f387a['query']),_0x2eab47['attributes']=_[_0x574168(0xcf)](_0x3f387a['model'],qs['fields'](_0x599689[_0x574168(0xd0)][_0x574168(0xca)])),_0x2eab47[_0x574168(0xd3)]=_0x2eab47[_0x574168(0xd3)]['length']?_0x2eab47[_0x574168(0xd3)]:_0x3f387a[_0x574168(0xc0)];typeof _0x599689[_0x574168(0xd0)][_0x574168(0xcb)]===_0x574168(0xd7)&&(_0x2eab47[_0x574168(0xc6)]=qs[_0x574168(0xc6)](_0x599689[_0x574168(0xd0)]['limit']),_0x2eab47[_0x574168(0xe2)]=qs['offset'](_0x599689[_0x574168(0xd0)][_0x574168(0xe2)]));_0x2eab47[_0x574168(0xb0)]=qs[_0x574168(0xbb)](_0x599689[_0x574168(0xd0)]['sort']),_0x2eab47[_0x574168(0xc2)]=qs['filters'](_[_0x574168(0xd1)](_0x599689[_0x574168(0xd0)],_0x3f387a[_0x574168(0xc7)]),_0xa83136);_0x599689['query'][_0x574168(0xba)]&&(_0x2eab47[_0x574168(0xc2)]=_[_0x574168(0xcc)](_0x2eab47[_0x574168(0xc2)],{[Op['or']]:_[_0x574168(0xb9)](_0xa83136,function(_0x3977c1){const _0x206598=_0x574168;if(_0x3977c1[_0x206598(0xc9)]!==_0x206598(0xb7)){const _0x4c320d={};return _0x4c320d[_0x3977c1[_0x206598(0xb3)]]={[Op['like']]:'%'+_0x599689['query'][_0x206598(0xba)]+'%'},_0x4c320d;}})}));_0x2eab47=_[_0x574168(0xcc)]({},_0x2eab47,_0x599689['options']);const _0x183a22={'where':_0x2eab47[_0x574168(0xc2)]};return db['MailTransferReport'][_0x574168(0xda)](_0x183a22)[_0x574168(0xd4)](function(_0x5a0979){const _0x4c57a8=_0x574168;return _0x43cb7e[_0x4c57a8(0xda)]=_0x5a0979,_0x599689[_0x4c57a8(0xd0)][_0x4c57a8(0xdf)]&&(_0x2eab47['include']=[{'all':!![]}]),db['MailTransferReport'][_0x4c57a8(0xcd)](_0x2eab47);})[_0x574168(0xd4)](function(_0x472abc){return _0x43cb7e['rows']=_0x472abc,_0x43cb7e;})[_0x574168(0xd4)](respondWithFilteredResult(_0x54a9ff,_0x2eab47))[_0x574168(0xd2)](handleError(_0x54a9ff,null));},exports['show']=function(_0x5b5f4e,_0x44a694){const _0x2991ff=a534_0x560916;let _0x20f44e={'raw':!![],'where':{'id':_0x5b5f4e[_0x2991ff(0xb2)]['id']}};const _0x32fcbe={};return _0x32fcbe[_0x2991ff(0xc0)]=_[_0x2991ff(0xbd)](db[_0x2991ff(0xb6)][_0x2991ff(0xd8)]),_0x32fcbe['query']=_[_0x2991ff(0xbd)](_0x5b5f4e[_0x2991ff(0xd0)]),_0x32fcbe[_0x2991ff(0xc7)]=_[_0x2991ff(0xcf)](_0x32fcbe['model'],_0x32fcbe[_0x2991ff(0xd0)]),_0x20f44e[_0x2991ff(0xd3)]=_[_0x2991ff(0xcf)](_0x32fcbe[_0x2991ff(0xc0)],qs[_0x2991ff(0xca)](_0x5b5f4e[_0x2991ff(0xd0)][_0x2991ff(0xca)])),_0x20f44e[_0x2991ff(0xd3)]=_0x20f44e[_0x2991ff(0xd3)]['length']?_0x20f44e[_0x2991ff(0xd3)]:_0x32fcbe['model'],_0x5b5f4e[_0x2991ff(0xd0)][_0x2991ff(0xdf)]&&(_0x20f44e[_0x2991ff(0xd9)]=[{'all':!![]}]),_0x20f44e=_[_0x2991ff(0xcc)]({},_0x20f44e,_0x5b5f4e[_0x2991ff(0xd5)]),db['MailTransferReport']['findOne'](_0x20f44e)[_0x2991ff(0xd4)](handleEntityNotFound(_0x44a694,null))['then'](respondWithResult(_0x44a694,null))[_0x2991ff(0xd2)](handleError(_0x44a694,null));},exports[a534_0x560916(0xe0)]=function(_0x132ac2,_0x4680d4){const _0x5be658=a534_0x560916;return db['MailTransferReport'][_0x5be658(0xe0)](_0x132ac2['body'],{})['then'](respondWithResult(_0x4680d4,0xc9))[_0x5be658(0xd2)](handleError(_0x4680d4,null));},exports[a534_0x560916(0xce)]=function(_0x249072,_0x59184a){const _0x556f0b=a534_0x560916;return _0x249072[_0x556f0b(0xc4)]['id']&&delete _0x249072[_0x556f0b(0xc4)]['id'],db[_0x556f0b(0xb6)][_0x556f0b(0xc3)]({'where':{'id':_0x249072[_0x556f0b(0xb2)]['id']}})[_0x556f0b(0xd4)](handleEntityNotFound(_0x59184a,null))['then'](saveUpdates(_0x249072[_0x556f0b(0xc4)],null))[_0x556f0b(0xd4)](respondWithResult(_0x59184a,null))['catch'](handleError(_0x59184a,null));},exports[a534_0x560916(0xc5)]=function(_0x1034b4,_0x138734){const _0x9d2c84=a534_0x560916;return db[_0x9d2c84(0xb6)][_0x9d2c84(0xc3)]({'where':{'id':_0x1034b4[_0x9d2c84(0xb2)]['id']}})[_0x9d2c84(0xd4)](handleEntityNotFound(_0x138734,null))[_0x9d2c84(0xd4)](removeEntity(_0x138734,null))[_0x9d2c84(0xd2)](handleError(_0x138734,null));},exports[a534_0x560916(0xdc)]=function(_0x178267,_0x189f35){const _0x1dea89=a534_0x560916;return db[_0x1dea89(0xb6)][_0x1dea89(0xdc)]()[_0x1dea89(0xd4)](respondWithResult(_0x189f35,null))[_0x1dea89(0xd2)](handleError(_0x189f35,null));};
\ No newline at end of file
+const a534_0x3305=['create','MailTransferReport','body','attributes','options','then','filters','limit','status','set','model','update','describe','show','fieldName','filter','error','offset','Content-Range','query','json','includeAll','params','findOne','map','lodash','keys','sequelize','end','../../config/logger','pick','../../mysqldb','catch','send','nolimit','intersection','../../components/parsers/qs','count','length','sendStatus','destroy','merge','key','include','sort','rows','fields','name','undefined','type','where'];(function(_0x3f2af5,_0x3b6c13){const _0x330509=function(_0x4c3975){while(--_0x4c3975){_0x3f2af5['push'](_0x3f2af5['shift']());}};_0x330509(++_0x3b6c13);}(a534_0x3305,0x1f2));const a534_0x4c39=function(_0x3f2af5,_0x3b6c13){_0x3f2af5=_0x3f2af5-0x14a;let _0x330509=a534_0x3305[_0x3f2af5];return _0x330509;};const a534_0x302597=a534_0x4c39;'use strict';const _=require(a534_0x302597(0x16f)),qs=require(a534_0x302597(0x17a)),logger=require(a534_0x302597(0x173))('api'),{db}=require(a534_0x302597(0x175)),{Op}=require(a534_0x302597(0x171));function respondWithResult(_0x12c560,_0x236ce6){return _0x236ce6=_0x236ce6||0xc8,function(_0x55b541){const _0x3e978f=a534_0x4c39;if(_0x55b541)return _0x12c560[_0x3e978f(0x15e)](_0x236ce6)['json'](_0x55b541);};}function respondWithFilteredResult(_0x4ad9f6,_0x275bd1){return function(_0x382d7e){const _0xa8069d=a534_0x4c39;if(_0x382d7e){const _0x5a6552=_0x382d7e[_0xa8069d(0x17b)],_0x5130c2=_0x275bd1['offset'];let _0x3e799f=_0x275bd1[_0xa8069d(0x167)]+_0x275bd1[_0xa8069d(0x15d)],_0x40d1db;return _0x3e799f>=_0x5a6552?(_0x3e799f=_0x5a6552,_0x40d1db=0xc8):_0x40d1db=0xce,_0x4ad9f6[_0xa8069d(0x15e)](_0x40d1db),_0x4ad9f6[_0xa8069d(0x15f)](_0xa8069d(0x168),_0x5130c2+'-'+_0x3e799f+'/'+_0x5a6552)[_0xa8069d(0x16a)](_0x382d7e);}return null;};}function saveUpdates(_0x6f2bd6){return function(_0x2b57ef){const _0x3043ad=a534_0x4c39;if(_0x2b57ef)return _0x2b57ef[_0x3043ad(0x161)](_0x6f2bd6)[_0x3043ad(0x15b)](function(_0x3976cf){return _0x3976cf;});return null;};}function removeEntity(_0x17251a){return function(_0x3968d4){const _0x2d0846=a534_0x4c39;if(_0x3968d4)return _0x3968d4[_0x2d0846(0x14b)]()['then'](function(){const _0x5406b7=_0x2d0846;_0x17251a[_0x5406b7(0x15e)](0xcc)[_0x5406b7(0x172)]();});};}function handleEntityNotFound(_0x236bd9){return function(_0xba7ae9){const _0x57cfce=a534_0x4c39;return!_0xba7ae9&&_0x236bd9[_0x57cfce(0x14a)](0x194),_0xba7ae9;};}function handleError(_0x5b4fdd,_0x49a5fc){return _0x49a5fc=_0x49a5fc||0x1f4,function(_0x1752e5){const _0x1c19e3=a534_0x4c39;logger[_0x1c19e3(0x166)](_0x1752e5['stack']),_0x1752e5[_0x1c19e3(0x152)]&&delete _0x1752e5[_0x1c19e3(0x152)],_0x5b4fdd[_0x1c19e3(0x15e)](_0x49a5fc)[_0x1c19e3(0x177)](_0x1752e5);};}exports['index']=function(_0x3f1430,_0x3fe163){const _0x1f9ebf=a534_0x302597;let _0x1bb628={};const _0x400bdd={},_0x462ae2={'count':0x0,'rows':[]},_0x404bdf=_['map'](db[_0x1f9ebf(0x157)]['rawAttributes'],function(_0x4b4ab4){const _0x2dc106=_0x1f9ebf;return{'name':_0x4b4ab4[_0x2dc106(0x164)],'type':_0x4b4ab4[_0x2dc106(0x154)][_0x2dc106(0x14d)]};});_0x400bdd[_0x1f9ebf(0x160)]=_[_0x1f9ebf(0x16e)](_0x404bdf,_0x1f9ebf(0x152)),_0x400bdd[_0x1f9ebf(0x169)]=_[_0x1f9ebf(0x170)](_0x3f1430[_0x1f9ebf(0x169)]),_0x400bdd[_0x1f9ebf(0x15c)]=_[_0x1f9ebf(0x179)](_0x400bdd[_0x1f9ebf(0x160)],_0x400bdd[_0x1f9ebf(0x169)]),_0x1bb628[_0x1f9ebf(0x159)]=_[_0x1f9ebf(0x179)](_0x400bdd[_0x1f9ebf(0x160)],qs[_0x1f9ebf(0x151)](_0x3f1430[_0x1f9ebf(0x169)]['fields'])),_0x1bb628[_0x1f9ebf(0x159)]=_0x1bb628['attributes']['length']?_0x1bb628[_0x1f9ebf(0x159)]:_0x400bdd[_0x1f9ebf(0x160)];typeof _0x3f1430[_0x1f9ebf(0x169)][_0x1f9ebf(0x178)]===_0x1f9ebf(0x153)&&(_0x1bb628[_0x1f9ebf(0x15d)]=qs['limit'](_0x3f1430[_0x1f9ebf(0x169)]['limit']),_0x1bb628[_0x1f9ebf(0x167)]=qs[_0x1f9ebf(0x167)](_0x3f1430[_0x1f9ebf(0x169)][_0x1f9ebf(0x167)]));_0x1bb628['order']=qs[_0x1f9ebf(0x14f)](_0x3f1430['query']['sort']),_0x1bb628[_0x1f9ebf(0x155)]=qs[_0x1f9ebf(0x15c)](_[_0x1f9ebf(0x174)](_0x3f1430[_0x1f9ebf(0x169)],_0x400bdd[_0x1f9ebf(0x15c)]),_0x404bdf);_0x3f1430[_0x1f9ebf(0x169)][_0x1f9ebf(0x165)]&&(_0x1bb628['where']=_[_0x1f9ebf(0x14c)](_0x1bb628[_0x1f9ebf(0x155)],{[Op['or']]:_[_0x1f9ebf(0x16e)](_0x404bdf,function(_0x12c7fa){const _0x185670=_0x1f9ebf;if(_0x12c7fa[_0x185670(0x154)]!=='VIRTUAL'){const _0x2ecbf0={};return _0x2ecbf0[_0x12c7fa[_0x185670(0x152)]]={[Op['like']]:'%'+_0x3f1430[_0x185670(0x169)]['filter']+'%'},_0x2ecbf0;}})}));_0x1bb628=_[_0x1f9ebf(0x14c)]({},_0x1bb628,_0x3f1430['options']);const _0x5ee479={'where':_0x1bb628['where']};return db['MailTransferReport'][_0x1f9ebf(0x17b)](_0x5ee479)[_0x1f9ebf(0x15b)](function(_0x4d7ecd){const _0x524f71=_0x1f9ebf;return _0x462ae2['count']=_0x4d7ecd,_0x3f1430[_0x524f71(0x169)][_0x524f71(0x16b)]&&(_0x1bb628[_0x524f71(0x14e)]=[{'all':!![]}]),db['MailTransferReport']['findAll'](_0x1bb628);})['then'](function(_0x124d59){const _0x268118=_0x1f9ebf;return _0x462ae2[_0x268118(0x150)]=_0x124d59,_0x462ae2;})[_0x1f9ebf(0x15b)](respondWithFilteredResult(_0x3fe163,_0x1bb628))[_0x1f9ebf(0x176)](handleError(_0x3fe163,null));},exports[a534_0x302597(0x163)]=function(_0x12b78e,_0x460f63){const _0x4d830c=a534_0x302597;let _0x4144b7={'raw':!![],'where':{'id':_0x12b78e[_0x4d830c(0x16c)]['id']}};const _0x4069d1={};return _0x4069d1[_0x4d830c(0x160)]=_[_0x4d830c(0x170)](db[_0x4d830c(0x157)]['rawAttributes']),_0x4069d1[_0x4d830c(0x169)]=_[_0x4d830c(0x170)](_0x12b78e[_0x4d830c(0x169)]),_0x4069d1[_0x4d830c(0x15c)]=_[_0x4d830c(0x179)](_0x4069d1[_0x4d830c(0x160)],_0x4069d1['query']),_0x4144b7[_0x4d830c(0x159)]=_['intersection'](_0x4069d1[_0x4d830c(0x160)],qs[_0x4d830c(0x151)](_0x12b78e[_0x4d830c(0x169)]['fields'])),_0x4144b7[_0x4d830c(0x159)]=_0x4144b7[_0x4d830c(0x159)][_0x4d830c(0x17c)]?_0x4144b7['attributes']:_0x4069d1['model'],_0x12b78e[_0x4d830c(0x169)][_0x4d830c(0x16b)]&&(_0x4144b7[_0x4d830c(0x14e)]=[{'all':!![]}]),_0x4144b7=_[_0x4d830c(0x14c)]({},_0x4144b7,_0x12b78e[_0x4d830c(0x15a)]),db['MailTransferReport'][_0x4d830c(0x16d)](_0x4144b7)[_0x4d830c(0x15b)](handleEntityNotFound(_0x460f63,null))[_0x4d830c(0x15b)](respondWithResult(_0x460f63,null))[_0x4d830c(0x176)](handleError(_0x460f63,null));},exports[a534_0x302597(0x156)]=function(_0x5aab17,_0x4b3198){const _0x495b2f=a534_0x302597;return db['MailTransferReport'][_0x495b2f(0x156)](_0x5aab17['body'],{})['then'](respondWithResult(_0x4b3198,0xc9))[_0x495b2f(0x176)](handleError(_0x4b3198,null));},exports[a534_0x302597(0x161)]=function(_0x2e2fc4,_0x21459b){const _0x29b924=a534_0x302597;return _0x2e2fc4[_0x29b924(0x158)]['id']&&delete _0x2e2fc4['body']['id'],db[_0x29b924(0x157)][_0x29b924(0x16d)]({'where':{'id':_0x2e2fc4[_0x29b924(0x16c)]['id']}})['then'](handleEntityNotFound(_0x21459b,null))[_0x29b924(0x15b)](saveUpdates(_0x2e2fc4[_0x29b924(0x158)],null))[_0x29b924(0x15b)](respondWithResult(_0x21459b,null))['catch'](handleError(_0x21459b,null));},exports[a534_0x302597(0x14b)]=function(_0x38df11,_0x39574f){const _0x45f21f=a534_0x302597;return db[_0x45f21f(0x157)][_0x45f21f(0x16d)]({'where':{'id':_0x38df11[_0x45f21f(0x16c)]['id']}})['then'](handleEntityNotFound(_0x39574f,null))[_0x45f21f(0x15b)](removeEntity(_0x39574f,null))['catch'](handleError(_0x39574f,null));},exports[a534_0x302597(0x162)]=function(_0x18a3ac,_0x3e5ecb){const _0x3f6991=a534_0x302597;return db[_0x3f6991(0x157)][_0x3f6991(0x162)]()[_0x3f6991(0x15b)](respondWithResult(_0x3e5ecb,null))[_0x3f6991(0x176)](handleError(_0x3e5ecb,null));};
\ No newline at end of file