Fix: fix init nftables, fix logic ban/unban command
All checks were successful
build / build (push) Successful in 2m39s

This commit is contained in:
d3m0k1d
2026-01-20 23:41:22 +03:00
parent e275a73460
commit 16a174cf56
4 changed files with 37 additions and 5 deletions

View File

@@ -111,6 +111,15 @@ func (d *DB) AddBan(ip string, ttl string) error {
return nil
}
func (d *DB) RemoveBan(ip string) error {
_, err := d.db.Exec("DELETE FROM bans WHERE ip = ?", ip)
if err != nil {
d.logger.Error("Failed to remove ban", "error", err)
return err
}
return nil
}
func (d *DB) BanList() error {
var count int