Skip to content

Commit

Permalink
fix: restore old car-scope parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Jul 5, 2023
1 parent 79f2092 commit 711168a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkg/server/http/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ func ParseScope(req *http.Request) (types.DagScope, error) {
}
// check for legacy param name -- to do -- delete once we confirm this isn't used any more
if req.URL.Query().Has("car-scope") {
return types.ParseDagScope(req.URL.Query().Get("car-scope"))
switch req.URL.Query().Get("car-scope") {
case "all":
return types.DagScopeAll, nil
case "file":
return types.DagScopeEntity, nil
case "block":
return types.DagScopeBlock, nil
default:
return types.DagScopeAll, errors.New("invalid car-scope parameter")
}
}
return types.DagScopeAll, nil
}
Expand Down

0 comments on commit 711168a

Please sign in to comment.