Cleaned up usage of fetch

This commit is contained in:
2022-06-10 16:53:42 +01:00
parent ed01fe6db5
commit 490860159e
6 changed files with 11 additions and 22 deletions
+1 -3
View File
@@ -23,9 +23,7 @@ const Account = props => {
//grab the user's info
useEffect(() => {
authTokens.tokenFetch(`${process.env.AUTH_URI}/auth/account`, {
method: 'GET'
})
authTokens.tokenFetch(`${process.env.AUTH_URI}/auth/account`)
.then(blob => blob.json())
.then(json => contactRef.current.checked = json.contact)
.catch(e => console.error(e))