Skip to content

Commit

Permalink
minor changes to validateWRP func
Browse files Browse the repository at this point in the history
  • Loading branch information
maurafortino committed Oct 11, 2023
1 parent 603e230 commit ecb3d78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions primaryHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,7 @@ func ValidateWRP() func(http.Handler) http.Handler {
return func(delegate http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

ctx := r.Context()
if msg, ok := wrpcontext.Get[*wrp.Message](ctx); ok {
if msg, ok := wrpcontext.Get[*wrp.Message](r.Context()); ok {

Check warning on line 570 in primaryHandler.go

View check run for this annotation

Codecov / codecov/patch

primaryHandler.go#L570

Added line #L570 was not covered by tests
validators := wrp.SpecValidators()
var err error
for _, v := range validators {
Expand All @@ -586,6 +585,7 @@ func ValidateWRP() func(http.Handler) http.Handler {
return
}
}

delegate.ServeHTTP(w, r)
})
}
Expand Down

0 comments on commit ecb3d78

Please sign in to comment.