update url to server url
This commit is contained in:
parent
c570604348
commit
90fec3fcc6
3 changed files with 224 additions and 217 deletions
|
|
@ -1,9 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Already Verified</title>
|
||||
<style>
|
||||
* {
|
||||
|
|
@ -13,7 +12,7 @@
|
|||
}
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
|
@ -56,16 +55,13 @@
|
|||
background: #cc284f;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>✅ Verified User!</h1>
|
||||
<p>You are already verified. Please log in to continue.</p>
|
||||
<a href="http://localhost:5175/login" class="btn">Log In</a>
|
||||
<a href="https://canvasdev.planpostai.com/login" class="btn">Log In</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Reset Password</title>
|
||||
<style>
|
||||
* {
|
||||
|
|
@ -13,7 +12,7 @@
|
|||
}
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
|
@ -76,19 +75,29 @@
|
|||
background: #cc284f;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h2>Reset Your Password</h2>
|
||||
<hr><br>
|
||||
<hr />
|
||||
<br />
|
||||
<form id="reset-form">
|
||||
<div class="input-group">
|
||||
<input type="password" id="password" placeholder="Enter new password" required />
|
||||
<input
|
||||
type="password"
|
||||
id="password"
|
||||
placeholder="Enter new password"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="password" id="confirm-password" placeholder="Confirm new password" required />
|
||||
<input
|
||||
type="password"
|
||||
id="confirm-password"
|
||||
placeholder="Confirm new password"
|
||||
required
|
||||
/>
|
||||
<p class="error" id="error-message">Passwords do not match!</p>
|
||||
</div>
|
||||
<button type="submit">Reset Password</button>
|
||||
|
|
@ -96,11 +105,14 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById("reset-form").addEventListener("submit", async function (event) {
|
||||
document
|
||||
.getElementById("reset-form")
|
||||
.addEventListener("submit", async function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
const password = document.getElementById("password").value;
|
||||
const confirmPassword = document.getElementById("confirm-password").value;
|
||||
const confirmPassword =
|
||||
document.getElementById("confirm-password").value;
|
||||
const errorMessage = document.getElementById("error-message");
|
||||
|
||||
if (password !== confirmPassword) {
|
||||
|
|
@ -113,17 +125,18 @@
|
|||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const token = urlParams.get("token");
|
||||
|
||||
const response = await fetch(`http://localhost:3000/api/auth/reset-password?token=${token}`, {
|
||||
const response = await fetch(
|
||||
`https://canvasdev.planpostai.com/api/auth/reset-password?token=${token}`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ password })
|
||||
});
|
||||
body: JSON.stringify({ password }),
|
||||
}
|
||||
);
|
||||
const data = await response.json();
|
||||
window.location.href="http://localhost:5175/login";
|
||||
window.location.href = "https://canvasdev.planpostai.com/login";
|
||||
alert(data.message);
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Verification Successful</title>
|
||||
<style>
|
||||
* {
|
||||
|
|
@ -13,7 +12,7 @@
|
|||
}
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
|
@ -56,14 +55,13 @@
|
|||
background: #cc284f;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>✅ Verification Successful!</h1>
|
||||
<p>Your email has been verified. You can now log in.</p>
|
||||
<a href="http://localhost:5175/login" class="btn">Log In</a>
|
||||
<a href="https://canvasdev.planpostai.com/login" class="btn">Log In</a>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Reference in a new issue