1 2 3 4 5 6 7 8 9 10 11
export default (loginData) => ( fetch('/api/user/login', { method: 'POST', headers: { 'Content-Type': 'application/json;charset=utf-8' }, body: JSON.stringify(loginData), }) .then(() => window.location.href = "/admin") .catch(() => {}) );