Skip to content

Commit

Permalink
fix: set http method to mux router when registering an endpoint/handler
Browse files Browse the repository at this point in the history
  • Loading branch information
vinyguedess committed Jun 29, 2022
1 parent a67f901 commit 0f734b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion router.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ func (router *GEHRouter) Handle(
) *mux.Route {
addEndpointToDocs(strings.ToLower(method), endpoint, docs)

return router.muxRouter.HandleFunc(endpoint, handler)
return router.muxRouter.
HandleFunc(endpoint, handler).
Methods(method)
}

func NewRouter(
Expand Down

0 comments on commit 0f734b3

Please sign in to comment.