From 2af4a39ac16c6245f0e87ddf3cc137339f6c604f Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sun, 1 May 2022 10:50:48 -0700 Subject: creating new post and replying to post working --- db/database.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'db') 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 } -- cgit v1.2.3