Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
….org into pr/Heinrich-XIAO/89
  • Loading branch information
Naviary2 committed Jul 16, 2024
2 parents cdaf71c + 8231074 commit 2e12454
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/client/scripts/member.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,19 @@ function showAccountInfo() {

async function removeAccount(confirmation) {
if (!confirmation || confirm("Are you sure you want to delete your account? This CAN NOT be undone!")) {
const password = prompt("Enter your password to confirm that this is you trying to delete your account: ");
if (password.length < 6) {
alert("Password Incorrect");
removeAccount(false);
return;
}
const config = { // Send with our access token
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ password: prompt("Enter your password to confirm that this is you trying to delete your account: ") }),
body: JSON.stringify({ password }),
credentials: 'same-origin', // Allows cookie to be set from this request
};

Expand Down

0 comments on commit 2e12454

Please sign in to comment.