Finally get login working.

This commit is contained in:
2025-03-26 08:36:11 +00:00
parent e55508661c
commit e3f3d73fdd
6 changed files with 96 additions and 28 deletions

View File

@@ -62,5 +62,17 @@ func InitDB(filepath string) *sql.DB {
log.Fatal("❌ Failed to create Users table:", err)
}
createAuditLogTable := `
CREATE TABLE IF NOT EXISTS auditlog (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT,
success INTEGER,
timestamp TEXT
);`
if _, err := db.Exec(createAuditLogTable); err != nil {
log.Fatal("❌ Failed to create Users table:", err)
}
return db
}