Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mchavez committed Aug 28, 2024
1 parent 9d42e97 commit e0722a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/uhttp/dbcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit e0722a2

Please sign in to comment.