made logout and lowercase unsensetive login and minor fix

This commit is contained in:
2025-04-17 14:00:07 +02:00
parent a2d66047ab
commit 282ff18155
+2 -2
View File
@@ -65,7 +65,7 @@ app.post("/register", (request, response) => {
let { username, password } = request.body;
username = username.toLowerCase();
if (!username && !password)
if (!username || !password)
return response.status(400).json({ error: "Username and password are required" });
const users = get_data();
@@ -85,7 +85,7 @@ app.get("/login", (request, response) => {
app.post("/login", (request, response) => {
let { username, password } = request.body;
username = username.toLowerCase();
if (!username && !password)
if (!username || !password)
return response.status(400).json({ error: "Username and password are required" });
const users = get_data();