added email

This commit is contained in:
oliver
2026-06-08 10:31:31 -03:00
parent 88d4a2d87f
commit 2a8c4c4515
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -813,11 +813,12 @@
"https://n8n.derez.ai/webhook/c2ce0eba-eb26-405d-8a90-8d982ec30698/update";
const APP_URL = "https://app.derez.ai";
/* ─── Extract token from URL ─────────────────────── */
/* ─── Extract token + email from URL ──────────────── */
const params = new URLSearchParams(window.location.search);
const token = params.get("token");
const email = params.get("email") || "";
/* ─── Init ───────────────────────────────────────── */
/* ─── Init ───────────────────────────────────── */
if (!token || token.length < 8) {
document.getElementById("invalid-state").style.display = "flex";
} else {
@@ -910,7 +911,7 @@
const res = await fetch(RESET_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ token, password }),
body: JSON.stringify({ token, password, email }),
});
if (!res.ok)