update url to server url

This commit is contained in:
smfahim25 2025-03-20 15:50:41 +06:00
parent c570604348
commit 90fec3fcc6
3 changed files with 224 additions and 217 deletions

View file

@ -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">
<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;
@ -59,13 +58,10 @@
</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>
</html>

View file

@ -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">
<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;
@ -79,16 +78,26 @@
</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>
</html>

View file

@ -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">
<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;
@ -62,8 +61,7 @@
<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>
</html>