authenticationUser = () => {
return fetch('http://localhost:3000/signin', {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: formAuhorization.email.value,
password: formAuhorization.password.value
})
})
.then(res => res.ok ? res.json() : Promise.reject(res.status))
.catch(err => console.log(err))
};