Finally get login working.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user