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>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Already Verified</title>
|
<title>Already Verified</title>
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
|
|
@ -13,7 +12,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -59,13 +58,10 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>✅ Verified User!</h1>
|
<h1>✅ Verified User!</h1>
|
||||||
<p>You are already verified. Please log in to continue.</p>
|
<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>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Reset Password</title>
|
<title>Reset Password</title>
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
|
|
@ -13,7 +12,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -79,16 +78,26 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>Reset Your Password</h2>
|
<h2>Reset Your Password</h2>
|
||||||
<hr><br>
|
<hr />
|
||||||
|
<br />
|
||||||
<form id="reset-form">
|
<form id="reset-form">
|
||||||
<div class="input-group">
|
<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>
|
||||||
<div class="input-group">
|
<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>
|
<p class="error" id="error-message">Passwords do not match!</p>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit">Reset Password</button>
|
<button type="submit">Reset Password</button>
|
||||||
|
|
@ -96,11 +105,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.getElementById("reset-form").addEventListener("submit", async function (event) {
|
document
|
||||||
|
.getElementById("reset-form")
|
||||||
|
.addEventListener("submit", async function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
const password = document.getElementById("password").value;
|
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");
|
const errorMessage = document.getElementById("error-message");
|
||||||
|
|
||||||
if (password !== confirmPassword) {
|
if (password !== confirmPassword) {
|
||||||
|
|
@ -113,17 +125,18 @@
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
const token = urlParams.get("token");
|
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",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({ password })
|
body: JSON.stringify({ password }),
|
||||||
});
|
}
|
||||||
|
);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
window.location.href="http://localhost:5175/login";
|
window.location.href = "https://canvasdev.planpostai.com/login";
|
||||||
alert(data.message);
|
alert(data.message);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Verification Successful</title>
|
<title>Verification Successful</title>
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
|
|
@ -13,7 +12,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -62,8 +61,7 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>✅ Verification Successful!</h1>
|
<h1>✅ Verification Successful!</h1>
|
||||||
<p>Your email has been verified. You can now log in.</p>
|
<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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Loading…
Add table
Reference in a new issue