Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / api / mailApplication / mailApplication.controller.js
index 3d49617..4bdbcb5 100644 (file)
@@ -1 +1 @@
-'use strict';const a483_0x1394=['@mysqldb','api','MailApplication','query','include','model','@config/logger','show','name','570038fQIdsi','rawAttributes','catch','546340PIKFQB','body','update','590531QtVQfS','filters','findOne','params','includeAll','@components/parsers/qs','json','destroy','length','1519797hSMGTL','sendStatus','8PUuMsd','keys','intersection','options','then','attributes','send','3uONbnX','fields','status','56292TOuQgD','151989iANgrJ','merge','lodash','75800LdICUE'];const a483_0x2a4a=function(_0x2ce080,_0x315f9c){_0x2ce080=_0x2ce080-0x1ee;let _0x1394db=a483_0x1394[_0x2ce080];return _0x1394db;};const a483_0x25f186=a483_0x2a4a;(function(_0x829629,_0x2cc689){const _0x3e7cb1=a483_0x2a4a;while(!![]){try{const _0x4366d0=-parseInt(_0x3e7cb1(0x203))+-parseInt(_0x3e7cb1(0x200))+-parseInt(_0x3e7cb1(0x1f6))*parseInt(_0x3e7cb1(0x211))+parseInt(_0x3e7cb1(0x1f2))*parseInt(_0x3e7cb1(0x1ef))+-parseInt(_0x3e7cb1(0x1f3))+parseInt(_0x3e7cb1(0x206))+parseInt(_0x3e7cb1(0x20f));if(_0x4366d0===_0x2cc689)break;else _0x829629['push'](_0x829629['shift']());}catch(_0x2edd05){_0x829629['push'](_0x829629['shift']());}}}(a483_0x1394,0x62bd5));const _=require(a483_0x25f186(0x1f5)),qs=require(a483_0x25f186(0x20b)),logger=require(a483_0x25f186(0x1fd))(a483_0x25f186(0x1f8)),{db}=require(a483_0x25f186(0x1f7));function respondWithResult(_0x5accad,_0x243c27){return _0x243c27=_0x243c27||0xc8,function(_0x739514){const _0xc1dd46=a483_0x2a4a;if(_0x739514)return _0x5accad[_0xc1dd46(0x1f1)](_0x243c27)[_0xc1dd46(0x20c)](_0x739514);};}function saveUpdates(_0x5a7c42){return function(_0x5eca3a){const _0x405a86=a483_0x2a4a;if(_0x5eca3a)return _0x5eca3a[_0x405a86(0x205)](_0x5a7c42)[_0x405a86(0x215)](function(_0x69ad08){return _0x69ad08;});return null;};}function removeEntity(_0x5b40af){return function(_0x78673a){const _0x4b8b43=a483_0x2a4a;if(_0x78673a)return _0x78673a[_0x4b8b43(0x20d)]()[_0x4b8b43(0x215)](function(){const _0x197d5e=_0x4b8b43;_0x5b40af[_0x197d5e(0x1f1)](0xcc)['end']();});};}function handleEntityNotFound(_0x5a81d7){return function(_0x545ba9){const _0x3f8de5=a483_0x2a4a;return!_0x545ba9&&_0x5a81d7[_0x3f8de5(0x210)](0x194),_0x545ba9;};}function handleError(_0x5426bd,_0x225164){return _0x225164=_0x225164||0x1f4,function(_0x28c90a){const _0x357fcb=a483_0x2a4a;logger['error'](_0x28c90a['stack']),_0x28c90a['name']&&delete _0x28c90a[_0x357fcb(0x1ff)],_0x5426bd[_0x357fcb(0x1f1)](_0x225164)[_0x357fcb(0x1ee)](_0x28c90a);};}exports[a483_0x25f186(0x1fe)]=function(_0x4158d5,_0x102530){const _0x48d1c3=a483_0x25f186;let _0x40692f={'raw':!![],'where':{'id':_0x4158d5[_0x48d1c3(0x209)]['id']}};const _0x3adf58={};return _0x3adf58[_0x48d1c3(0x1fc)]=_[_0x48d1c3(0x212)](db[_0x48d1c3(0x1f9)][_0x48d1c3(0x201)]),_0x3adf58[_0x48d1c3(0x1fa)]=_[_0x48d1c3(0x212)](_0x4158d5[_0x48d1c3(0x1fa)]),_0x3adf58[_0x48d1c3(0x207)]=_[_0x48d1c3(0x213)](_0x3adf58[_0x48d1c3(0x1fc)],_0x3adf58['query']),_0x40692f['attributes']=_[_0x48d1c3(0x213)](_0x3adf58['model'],qs[_0x48d1c3(0x1f0)](_0x4158d5[_0x48d1c3(0x1fa)][_0x48d1c3(0x1f0)])),_0x40692f['attributes']=_0x40692f['attributes'][_0x48d1c3(0x20e)]?_0x40692f[_0x48d1c3(0x216)]:_0x3adf58[_0x48d1c3(0x1fc)],_0x4158d5[_0x48d1c3(0x1fa)][_0x48d1c3(0x20a)]&&(_0x40692f[_0x48d1c3(0x1fb)]=[{'all':!![]}]),_0x40692f=_[_0x48d1c3(0x1f4)]({},_0x40692f,_0x4158d5[_0x48d1c3(0x214)]),db['MailApplication']['findOne'](_0x40692f)[_0x48d1c3(0x215)](handleEntityNotFound(_0x102530,null))[_0x48d1c3(0x215)](respondWithResult(_0x102530,null))[_0x48d1c3(0x202)](handleError(_0x102530,null));},exports[a483_0x25f186(0x205)]=function(_0x2cfcf8,_0x4d9eab){const _0x181e07=a483_0x25f186;return _0x2cfcf8[_0x181e07(0x204)]['id']&&delete _0x2cfcf8[_0x181e07(0x204)]['id'],db[_0x181e07(0x1f9)][_0x181e07(0x208)]({'where':{'id':_0x2cfcf8[_0x181e07(0x209)]['id']}})[_0x181e07(0x215)](handleEntityNotFound(_0x4d9eab,null))[_0x181e07(0x215)](saveUpdates(_0x2cfcf8[_0x181e07(0x204)],null))[_0x181e07(0x215)](respondWithResult(_0x4d9eab,null))[_0x181e07(0x202)](handleError(_0x4d9eab,null));},exports[a483_0x25f186(0x20d)]=function(_0x27a03b,_0x3f1efa){const _0x2c6bd5=a483_0x25f186;return db[_0x2c6bd5(0x1f9)][_0x2c6bd5(0x208)]({'where':{'id':_0x27a03b[_0x2c6bd5(0x209)]['id']}})[_0x2c6bd5(0x215)](handleEntityNotFound(_0x3f1efa,null))[_0x2c6bd5(0x215)](removeEntity(_0x3f1efa,null))[_0x2c6bd5(0x202)](handleError(_0x3f1efa,null));};
\ No newline at end of file
+'use strict';const a483_0x2013=['1095669jEyLLH','includeAll','77678dteISE','lodash','filters','update','name','@components/parsers/qs','899vLGBBL','findOne','length','model','destroy','body','merge','attributes','44838DWTLjS','stack','rawAttributes','query','params','fields','show','catch','1193CmXJjo','@config/logger','options','576037syKIrC','json','then','@mysqldb','MailApplication','2557CICxbA','end','keys','788325PnEvWO','19MEOQnh','sendStatus','send','status','intersection','error','173qmUmty','3ousbam'];const a483_0x47ef=function(_0x320437,_0xeacfab){_0x320437=_0x320437-0xc0;let _0x201302=a483_0x2013[_0x320437];return _0x201302;};const a483_0x3de2b4=a483_0x47ef;(function(_0x409104,_0x33c7b4){const _0x43e5ff=a483_0x47ef;while(!![]){try{const _0x35f828=parseInt(_0x43e5ff(0xe9))*parseInt(_0x43e5ff(0xc0))+-parseInt(_0x43e5ff(0xe2))*-parseInt(_0x43e5ff(0xce))+-parseInt(_0x43e5ff(0xd9))+-parseInt(_0x43e5ff(0xe1))+parseInt(_0x43e5ff(0xd6))*-parseInt(_0x43e5ff(0xe8))+-parseInt(_0x43e5ff(0xea))+parseInt(_0x43e5ff(0xc6))*parseInt(_0x43e5ff(0xde));if(_0x35f828===_0x33c7b4)break;else _0x409104['push'](_0x409104['shift']());}catch(_0x3902cf){_0x409104['push'](_0x409104['shift']());}}}(a483_0x2013,0xaf1df));const _=require(a483_0x3de2b4(0xc1)),qs=require(a483_0x3de2b4(0xc5)),logger=require(a483_0x3de2b4(0xd7))('api'),{db}=require(a483_0x3de2b4(0xdc));function respondWithResult(_0x109073,_0x17a3f8){return _0x17a3f8=_0x17a3f8||0xc8,function(_0x50248f){const _0x5f4b70=a483_0x47ef;if(_0x50248f)return _0x109073[_0x5f4b70(0xe5)](_0x17a3f8)[_0x5f4b70(0xda)](_0x50248f);};}function saveUpdates(_0x284a29){return function(_0x5abe8e){const _0x136b78=a483_0x47ef;if(_0x5abe8e)return _0x5abe8e[_0x136b78(0xc3)](_0x284a29)[_0x136b78(0xdb)](function(_0x22af99){return _0x22af99;});return null;};}function removeEntity(_0x139d68){return function(_0x279013){const _0x5079cf=a483_0x47ef;if(_0x279013)return _0x279013[_0x5079cf(0xca)]()[_0x5079cf(0xdb)](function(){const _0x3b66d6=_0x5079cf;_0x139d68[_0x3b66d6(0xe5)](0xcc)[_0x3b66d6(0xdf)]();});};}function handleEntityNotFound(_0x5ae7dd){return function(_0x4726b8){const _0x200d0b=a483_0x47ef;return!_0x4726b8&&_0x5ae7dd[_0x200d0b(0xe3)](0x194),_0x4726b8;};}function handleError(_0x24c674,_0x539dee){return _0x539dee=_0x539dee||0x1f4,function(_0x17347c){const _0x4cd0b5=a483_0x47ef;logger[_0x4cd0b5(0xe7)](_0x17347c[_0x4cd0b5(0xcf)]),_0x17347c['name']&&delete _0x17347c[_0x4cd0b5(0xc4)],_0x24c674[_0x4cd0b5(0xe5)](_0x539dee)[_0x4cd0b5(0xe4)](_0x17347c);};}exports[a483_0x3de2b4(0xd4)]=function(_0x228dcb,_0x54ed18){const _0x30edfa=a483_0x3de2b4;let _0x22f11a={'raw':!![],'where':{'id':_0x228dcb['params']['id']}};const _0x2b0855={};return _0x2b0855['model']=_[_0x30edfa(0xe0)](db[_0x30edfa(0xdd)][_0x30edfa(0xd0)]),_0x2b0855[_0x30edfa(0xd1)]=_[_0x30edfa(0xe0)](_0x228dcb[_0x30edfa(0xd1)]),_0x2b0855[_0x30edfa(0xc2)]=_[_0x30edfa(0xe6)](_0x2b0855['model'],_0x2b0855[_0x30edfa(0xd1)]),_0x22f11a[_0x30edfa(0xcd)]=_[_0x30edfa(0xe6)](_0x2b0855[_0x30edfa(0xc9)],qs[_0x30edfa(0xd3)](_0x228dcb[_0x30edfa(0xd1)]['fields'])),_0x22f11a[_0x30edfa(0xcd)]=_0x22f11a['attributes'][_0x30edfa(0xc8)]?_0x22f11a[_0x30edfa(0xcd)]:_0x2b0855['model'],_0x228dcb[_0x30edfa(0xd1)][_0x30edfa(0xeb)]&&(_0x22f11a['include']=[{'all':!![]}]),_0x22f11a=_[_0x30edfa(0xcc)]({},_0x22f11a,_0x228dcb[_0x30edfa(0xd8)]),db['MailApplication'][_0x30edfa(0xc7)](_0x22f11a)[_0x30edfa(0xdb)](handleEntityNotFound(_0x54ed18,null))['then'](respondWithResult(_0x54ed18,null))[_0x30edfa(0xd5)](handleError(_0x54ed18,null));},exports['update']=function(_0xdde8e6,_0xdc70b){const _0x1c69e0=a483_0x3de2b4;return _0xdde8e6[_0x1c69e0(0xcb)]['id']&&delete _0xdde8e6[_0x1c69e0(0xcb)]['id'],db[_0x1c69e0(0xdd)][_0x1c69e0(0xc7)]({'where':{'id':_0xdde8e6[_0x1c69e0(0xd2)]['id']}})[_0x1c69e0(0xdb)](handleEntityNotFound(_0xdc70b,null))[_0x1c69e0(0xdb)](saveUpdates(_0xdde8e6[_0x1c69e0(0xcb)],null))['then'](respondWithResult(_0xdc70b,null))['catch'](handleError(_0xdc70b,null));},exports[a483_0x3de2b4(0xca)]=function(_0x2e500e,_0x4ff2a7){const _0x1dda34=a483_0x3de2b4;return db[_0x1dda34(0xdd)]['findOne']({'where':{'id':_0x2e500e[_0x1dda34(0xd2)]['id']}})[_0x1dda34(0xdb)](handleEntityNotFound(_0x4ff2a7,null))['then'](removeEntity(_0x4ff2a7,null))[_0x1dda34(0xd5)](handleError(_0x4ff2a7,null));};
\ No newline at end of file