feat: add new block judge
All checks were successful
CI.yml / build (push) Successful in 1m48s

This commit is contained in:
d3m0k1d
2026-01-13 19:08:11 +03:00
parent 0421d9ef40
commit 95a58dc780
2 changed files with 78 additions and 0 deletions

View File

@@ -40,3 +40,12 @@ func (d *DB) CreateTable() error {
d.logger.Info("Created tables")
return nil
}
func (d *DB) SearchUnViewed() (*sql.Rows, error) {
rows, err := d.db.Query("SELECT id, service, ip, path, status, method, viewed, created_at FROM requests WHERE viewed = 0")
if err != nil {
d.logger.Error("Failed to query database")
return nil, err
}
return rows, nil
}