adding validated services? patching forcad_local.py

This commit is contained in:
Your Name
2026-08-13 08:32:35 +07:00
parent d485f61169
commit e795614e45
1459 changed files with 420036 additions and 436 deletions

View File

@@ -0,0 +1,35 @@
<!doctype html>
<html>
<head>
<title>Login</title>
</head>
<body>
<h1>Login</h1>
<form id="loginForm">
<input type="text" id="username" placeholder="Username" /><br />
<input type="password" id="password" placeholder="Password" /><br />
<button type="submit">Login</button>
</form>
<p id="msg"></p>
<script>
document
.getElementById("loginForm")
.addEventListener("submit", async (e) => {
e.preventDefault();
const res = await fetch("/api/user/login", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
username: document.getElementById("username").value,
password: document.getElementById("password").value,
}),
});
document.getElementById("msg").textContent = res.ok
? "Logged in! Cookie set."
: "Wrong username or password.";
});
</script>
</body>
</html>