Add tickets to db.
This commit is contained in:
@@ -55,7 +55,7 @@ func GetUserByID(id int) *User {
|
||||
}
|
||||
|
||||
func LogLoginAttempt(username string, success bool) {
|
||||
_, err := db.Exec("INSERT INTO login_audit (username, success, timestamp) VALUES (?, ?, ?)",
|
||||
_, err := db.Exec("INSERT INTO auditlog (username, success, timestamp) VALUES (?, ?, ?)",
|
||||
username, boolToInt(success), time.Now().Format(time.RFC3339))
|
||||
if err != nil {
|
||||
log.Println("❌ Failed to log login:", err)
|
||||
|
||||
Reference in New Issue
Block a user