fix: add error logging to remaining nolint:errcheck scan sites for observability
CI / Env docs check (push) Successful in 15s
CI / Docker compose check (push) Successful in 16s
CI / Nginx config check (push) Successful in 20s
CI / Frontend major deps (push) Successful in 30s
CI / Frontend deps check (push) Successful in 32s
CI / Secrets scan (push) Successful in 47s
CI / Go build (push) Successful in 44s
CI / Frontend build (push) Successful in 49s
CI / Go vet (dev) (push) Has been cancelled
CI / Go vet (prod) (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / Staticcheck (dev) (push) Has been cancelled
CI / Staticcheck (prod) (push) Has been cancelled
CI / Security scan (dev) (push) Has been cancelled
CI / Security scan (prod) (push) Has been cancelled
CI / go mod tidy (push) Has been cancelled
CI / Tests (prod) (push) Has been cancelled
CI / Tests (dev) (push) Has been cancelled
CI / Race (prod) (push) Has been cancelled
CI / Race (dev) (push) Has been cancelled
CI / Go vulnerabilities (push) Has been cancelled
CI / Knip (push) Has been cancelled
CI / Frontend a11y check (push) Has been cancelled
CI / Svelte strict check (push) Has been cancelled
CI / Frontend QC (audit) (push) Has been cancelled
CI / Frontend QC (typecheck) (push) Has been cancelled
CI / Frontend QC (lint) (push) Has been cancelled
CI / Env docs check (push) Successful in 15s
CI / Docker compose check (push) Successful in 16s
CI / Nginx config check (push) Successful in 20s
CI / Frontend major deps (push) Successful in 30s
CI / Frontend deps check (push) Successful in 32s
CI / Secrets scan (push) Successful in 47s
CI / Go build (push) Successful in 44s
CI / Frontend build (push) Successful in 49s
CI / Go vet (dev) (push) Has been cancelled
CI / Go vet (prod) (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / Staticcheck (dev) (push) Has been cancelled
CI / Staticcheck (prod) (push) Has been cancelled
CI / Security scan (dev) (push) Has been cancelled
CI / Security scan (prod) (push) Has been cancelled
CI / go mod tidy (push) Has been cancelled
CI / Tests (prod) (push) Has been cancelled
CI / Tests (dev) (push) Has been cancelled
CI / Race (prod) (push) Has been cancelled
CI / Race (dev) (push) Has been cancelled
CI / Go vulnerabilities (push) Has been cancelled
CI / Knip (push) Has been cancelled
CI / Frontend a11y check (push) Has been cancelled
CI / Svelte strict check (push) Has been cancelled
CI / Frontend QC (audit) (push) Has been cancelled
CI / Frontend QC (typecheck) (push) Has been cancelled
CI / Frontend QC (lint) (push) Has been cancelled
This commit is contained in:
@@ -565,13 +565,15 @@ func ListAdminUsersHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// Run BEFORE the data query to avoid "conn busy" errors when routing
|
||||
// through a per-test transaction (pgx.Tx does not support concurrent queries).
|
||||
if searchTerm != "" {
|
||||
//nolint:errcheck // zero value is acceptable fallback on scan failure
|
||||
_ = db.Conn.QueryRow(r.Context(), `SELECT COUNT(DISTINCT u.id) FROM users u
|
||||
if err := db.Conn.QueryRow(r.Context(), `SELECT COUNT(DISTINCT u.id) FROM users u
|
||||
LEFT JOIN bookings b ON u.id = b.user_id
|
||||
WHERE u.fn ILIKE $1 OR u.email ILIKE $1 OR u.phone ILIKE $1`, "%"+searchTerm+"%").Scan(&total)
|
||||
WHERE u.fn ILIKE $1 OR u.email ILIKE $1 OR u.phone ILIKE $1`, "%"+searchTerm+"%").Scan(&total); err != nil {
|
||||
log.Printf("Failed to scan filtered user count: %v", err)
|
||||
}
|
||||
} else {
|
||||
//nolint:errcheck // zero value is acceptable fallback on scan failure
|
||||
_ = db.Conn.QueryRow(r.Context(), "SELECT COUNT(*) FROM users").Scan(&total)
|
||||
if err := db.Conn.QueryRow(r.Context(), "SELECT COUNT(*) FROM users").Scan(&total); err != nil {
|
||||
log.Printf("Failed to scan user count: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Get users list
|
||||
|
||||
Reference in New Issue
Block a user