This commit is contained in:
Cay 2026-03-11 19:08:32 +00:00
parent ed64024f39
commit 4d587807db

View File

@ -11,6 +11,9 @@ router.post("/", async (req, res) => {
const { username, password } = req.body;
try {
/* Server laden (für index.ejs) */
const [servers] = await db.query("SELECT * FROM servers");
const [rows] = await db.query(
"SELECT * FROM accounts WHERE username = ? AND verified = 1",
[username],
@ -19,6 +22,7 @@ router.post("/", async (req, res) => {
if (rows.length === 0) {
return res.render("index", {
error: "Login fehlgeschlagen",
servers,
});
}
@ -29,6 +33,7 @@ router.post("/", async (req, res) => {
if (!passwordMatch) {
return res.render("index", {
error: "Login fehlgeschlagen",
servers,
});
}