Merge remote-tracking branch 'origin/main'

This commit is contained in:
Tracker-Friendly 2024-06-21 19:17:53 +01:00
commit d2d33e6a13
1 changed files with 19 additions and 20 deletions

View File

@ -8,27 +8,26 @@
<body style="background-color: transparent;"> <body style="background-color: transparent;">
<script> <script>
async function deleteacct() { async function deleteacct() {
if (confirm("Are you SURE you would like to delete your account forever?") != true) { if (confirm("Are you SURE you would like to delete your account forever?") == true) {
break await fetch(remote + "/api/deleteaccount", {
} method: "POST",
await fetch(remote + "/api/deleteaccount", { body: JSON.stringify({
method: "POST", "secretKey": localStorage.getItem("DONOTSHARE-secretkey")
body: JSON.stringify({ }),
"secretKey": localStorage.getItem("DONOTSHARE-secretkey") headers: {
}), "Content-Type": "application/json; charset=UTF-8"
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
.then((response) => {
async function doStuff() {
if (response.status === 200) {
parent.window.location.href = '/logout';
} }
} })
doStuff() .then((response) => response)
}); .then((response) => {
async function doStuff() {
if (response.status === 200) {
parent.window.location.href = '/logout';
}
}
doStuff()
});
}
} }
fetch("/api/userinfo", { fetch("/api/userinfo", {