aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/database.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/db/database.go b/db/database.go
index 1ceac40..fcdb5f9 100644
--- a/db/database.go
+++ b/db/database.go
@@ -591,14 +591,7 @@ func IsHashBanned(hash string) (bool, error) {
query := `select hash from bannedmedia where hash=$1`
- rows, err := config.DB.Query(query, hash)
- if err != nil {
- return true, err
- }
- defer rows.Close()
-
- rows.Next()
- err = rows.Scan(&h)
+ _ = config.DB.QueryRow(query, hash).Scan(&h)
- return h == hash, err
+ return h == hash, nil
}