fix login and favorites tab...

This commit is contained in:
Henry Jameson 2019-01-17 22:11:51 +03:00
parent cab87744c8
commit 93cbb58212
5 changed files with 64 additions and 32 deletions

View file

@ -366,6 +366,18 @@ const verifyCredentials = (user) => {
method: 'POST',
headers: authHeaders(user)
})
.then((response) => {
if (response.ok) {
return response.json()
} else {
return {
error: response
}
}
})
.then((data) => ({
user: parseUser(data)
}))
}
const favorite = ({ id, credentials }) => {