Skip to content

Commit

Permalink
rv
Browse files Browse the repository at this point in the history
Co-authored-by: Marcin Rataj <lidel@lidel.org>
  • Loading branch information
hacdias and lidel authored May 25, 2023
1 parent ab2c64f commit d62808d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gateway/handler_car.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ import (
"go.uber.org/multierr"
)

const carRangeBytesKey = "entity-bytes"
const carTerminalElementTypeKey = "dag-scope"
const (
carRangeBytesKey = "entity-bytes"
carTerminalElementTypeKey = "dag-scope"
)

// serveCAR returns a CAR stream for specific DAG+selector
func (i *handler) serveCAR(ctx context.Context, w http.ResponseWriter, r *http.Request, imPath ImmutablePath, contentPath ipath.Path, carVersion string, begin time.Time) bool {
Expand Down Expand Up @@ -56,7 +58,7 @@ func (i *handler) serveCAR(ctx context.Context, w http.ResponseWriter, r *http.R
case dagScopeEntity, dagScopeAll, dagScopeBlock:
params.Scope = s
default:
err := fmt.Errorf("unsupported dag-scope %s", scopeStr)
err := fmt.Errorf("unsupported dag-scope %q", scopeStr)
webError(w, err, http.StatusBadRequest)
return false
}
Expand Down

0 comments on commit d62808d

Please sign in to comment.