Applicatie afmaken en GUI-flow herstellen

Voegt boodschappenlijsten, productbeheer, realtime synchronisatie en browsercache-updates toe. Herstelt login- en sessiegedrag en maakt database-seeding herhaalbaar.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-08-07 20:44:05 +02:00
parent 26a820b41a
commit ce68182c08
23 changed files with 552 additions and 163 deletions
+10 -9
View File
@@ -19,11 +19,14 @@ class AuthController {
async register(req, res) {
const {
name,
email,
password
} = req.body;
const name = (req.body.name || "").trim();
const email = (req.body.email || "").trim().toLowerCase();
const password = req.body.password || "";
if (name.length < 2 || !/^\S+@\S+\.\S+$/.test(email) || password.length < 8) {
req.flash("error", "Vul een naam, geldig e-mailadres en een wachtwoord van minimaal 8 tekens in.");
return res.redirect("/register");
}
const existingUser = db.prepare(
@@ -97,10 +100,8 @@ class AuthController {
async login(req, res) {
const {
email,
password
} = req.body;
const email = (req.body.email || "").trim().toLowerCase();
const password = req.body.password || "";
const user = db.prepare(