diff options
author | FChannel <> | 2022-05-01 10:50:48 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | 2af4a39ac16c6245f0e87ddf3cc137339f6c604f (patch) | |
tree | cec86f25fd4bcd7cc1efd0bd01cfe8524b41c42c /db/database.go | |
parent | 503a6637b8294aeb8e5e5546f8acbd2b3d6c4744 (diff) |
creating new post and replying to post working
Diffstat (limited to 'db/database.go')
-rw-r--r-- | db/database.go | 11 |
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 } |