fix
This commit is contained in:
parent
59d11b3d4e
commit
ed68e274e2
|
@ -145,14 +145,15 @@ function resetPassword() {
|
||||||
},
|
},
|
||||||
body: JSON.stringify(data)
|
body: JSON.stringify(data)
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
|
||||||
if (response.ok ) {
|
if (data.code == 200 ) {
|
||||||
console.log(response);
|
|
||||||
document.getElementById('successMessage').innerText = JSON.stringify(response);
|
document.getElementById('successMessage').innerText = JSON.stringify(data);
|
||||||
} else {
|
} else {
|
||||||
console.error('Password reset failed');
|
console.error('Password reset failed');
|
||||||
document.getElementById('errorMessage').innerText = 'Password reset failed. Please try again.';
|
document.getElementById('errorMessage').innerText = JSON.stringify(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user