From e0722a2f2478f6aff9d6cd2ff303b8006dfab43e Mon Sep 17 00:00:00 2001 From: mchavez Date: Tue, 27 Aug 2024 23:34:26 -0600 Subject: [PATCH] Fix tests --- pkg/uhttp/dbcache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/uhttp/dbcache.go b/pkg/uhttp/dbcache.go index 64e43f6b..3a8cee18 100644 --- a/pkg/uhttp/dbcache.go +++ b/pkg/uhttp/dbcache.go @@ -281,7 +281,7 @@ func (d *DBCache) Select(ctx context.Context, key string) ([]byte, error) { } l := ctxzap.Extract(ctx) - rows, err := d.db.Query("SELECT data FROM http_cache where key = '?'", key) + rows, err := d.db.Query("SELECT data FROM http_cache where key = ?", key) if err != nil { l.Debug(errQueryingTable, zap.Error(err)) return nil, err @@ -312,7 +312,7 @@ func (d *DBCache) Remove(ctx context.Context, key string) error { return err } - _, err = d.db.Exec("DELETE FROM http_cache WHERE key = '?'", key) + _, err = d.db.Exec("DELETE FROM http_cache WHERE key = ?", key) if err != nil { if errtx := tx.Rollback(); errtx != nil { l.Debug(failRollback, zap.Error(errtx))