From 16dc738c1f8582316c2c1467f5da407492af5aeb Mon Sep 17 00:00:00 2001 From: db1234719 Date: Mon, 4 May 2026 08:16:49 +0330 Subject: [PATCH] fix: removed unnecessary api user --- sqlite_logger.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sqlite_logger.go b/sqlite_logger.go index 48db20b..283448f 100644 --- a/sqlite_logger.go +++ b/sqlite_logger.go @@ -20,8 +20,7 @@ func initDB(dbPath string) (*sql.DB, error) { action TEXT NOT NULL, ip TEXT NOT NULL, ttl_seconds INTEGER DEFAULT 0, - reason TEXT, - api_user TEXT + reason TEXT ); CREATE INDEX IF NOT EXISTS idx_timestamp ON whitelist_audit(timestamp); ` @@ -34,9 +33,9 @@ func initDB(dbPath string) (*sql.DB, error) { func logWhitelistEvent(db *sql.DB, action, ip string, ttl int, reason, apiUser string) { _, err := db.Exec( - `INSERT INTO whitelist_audit(timestamp, action, ip, ttl_seconds, reason, api_user) - VALUES(?, ?, ?, ?, ?, ?)`, - time.Now(), action, ip, ttl, reason, apiUser, + `INSERT INTO whitelist_audit(timestamp, action, ip, ttl_seconds, reason) + VALUES(?, ?, ?, ?, ?)`, + time.Now(), action, ip, ttl, reason, ) if err != nil { slog.Error("failed to log whitelist event", "error", err)