Updated dependencies, addressed #33

This commit is contained in:
2022-05-30 06:10:01 +01:00
parent 22703bfbcb
commit d44cae397d
19 changed files with 2430 additions and 2790 deletions
+1 -5
View File
@@ -24,10 +24,7 @@ const Account = props => {
//grab the user's info
useEffect(() => {
authTokens.tokenFetch(`${process.env.AUTH_URI}/auth/account`, {
method: 'GET',
headers: {
'Access-Control-Allow-Origin': '*'
}
method: 'GET'
})
.then(blob => blob.json())
.then(json => contactRef.current.checked = json.contact)
@@ -88,7 +85,6 @@ const update = async (password, retype, contact, tokenFetch) => {
const result = await tokenFetch(`${process.env.AUTH_URI}/auth/account`, {
method: 'PATCH',
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json'
},
body: JSON.stringify({
+1 -2
View File
@@ -72,8 +72,7 @@ const handleSubmit = async (email, password) => {
const result = await fetch(`${process.env.AUTH_URI}/auth/login`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
'Content-Type': 'application/json'
},
body: JSON.stringify({
email,
@@ -38,7 +38,6 @@ const handleSubmit = async (password, authTokens) => {
const result = await authTokens.tokenFetch(`${process.env.AUTH_URI}/auth/account`, {
method: 'DELETE',
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json'
},
body: JSON.stringify({
@@ -54,7 +53,6 @@ const handleSubmit = async (password, authTokens) => {
const result2 = await authTokens.tokenFetch(`${process.env.AUTH_URI}/auth/logout`, {
method: 'DELETE',
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json'
},
body: JSON.stringify({
+1 -2
View File
@@ -14,8 +14,7 @@ const Logout = () => {
const result = await authTokens.tokenFetch(`${process.env.AUTH_URI}/auth/logout`, { //NOTE: this gets overwritten as a bugfix
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
'Content-Type': 'application/json'
},
body: JSON.stringify({
token: authTokens.refreshToken
+1 -2
View File
@@ -66,8 +66,7 @@ const handleSubmit = async (email) => {
const result = await fetch(`${process.env.AUTH_URI}/auth/recover`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
'Content-Type': 'application/json'
},
body: JSON.stringify({
email
-1
View File
@@ -68,7 +68,6 @@ const update = async (password, retype, query) => {
const result = await fetch(`${process.env.AUTH_URI}/auth/reset?email=${query.email}&token=${query.token}`, {
method: 'PATCH',
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json'
},
body: JSON.stringify({
+1 -2
View File
@@ -83,8 +83,7 @@ const handleSubmit = async (email, username, password, retype, contact) => {
const result = await fetch(`${process.env.AUTH_URI}/auth/signup`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
'Content-Type': 'application/json'
},
body: JSON.stringify({
email,