Skip to content

Commit 9ad9f4b

Browse files
committed
json fix pw reset
1 parent 4b1919d commit 9ad9f4b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/API/apiData.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,16 +241,17 @@ export const requestFriend = async (BASE_URL, username, token, friend_username)
241241

242242
export const forgotPassword = async (BASE_URL, PWR_USER, PWR_PASS, userEmail) => {
243243
try {
244+
const body = {
245+
"PWR_USER": PWR_USER,
246+
"PWR_PASS": PWR_PASS,
247+
"userEmail": userEmail
248+
}
244249
const res = await fetch(`${ BASE_URL }/pwr/auth`, {
245250
method: 'POST',
246251
headers: {
247252
"Content-Type": "application/json",
248253
},
249-
body: {
250-
"PWR_USER": PWR_USER,
251-
"PWR_PASS": PWR_PASS,
252-
"userEmail": userEmail
253-
}
254+
body: JSON.stringify(body)
254255
})
255256
const data = res.json()
256257
if (data.error) {

0 commit comments

Comments
 (0)