aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorFChannel <>2022-05-01 10:50:48 -0700
committerFChannel <>2022-06-19 12:53:29 -0700
commit2af4a39ac16c6245f0e87ddf3cc137339f6c604f (patch)
treecec86f25fd4bcd7cc1efd0bd01cfe8524b41c42c /db
parent503a6637b8294aeb8e5e5546f8acbd2b3d6c4744 (diff)
creating new post and replying to post working
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
}