add server side password change information

This commit is contained in:
2026-03-31 22:05:47 -04:00
parent c628c688f7
commit 737a1908e0
3 changed files with 98 additions and 43 deletions

View File

@@ -205,12 +205,12 @@
method: "POST",
body: formData,
})
.then((res) => res.json())
.then((data) => {
// handle success
})
.catch((err) => {
displayError("Something went wrong");
.then(async (res) => {
const data = await res.json();
if (!res.ok) {
throw new Error(data.error || "Request failed");
}
return data;
})
.then((data) => {
document
@@ -219,6 +219,9 @@
document
.getElementById("popup_background")
.classList.add("hidden");
})
.catch((err) => {
displayError(err.message);
});
});
</script>