mirror of
https://github.com/Fishwaldo/huma.git
synced 2025-03-15 19:31:27 +00:00
fix: panic on unknown verb
This commit is contained in:
parent
707c610d6f
commit
ea204ab9e3
1 changed files with 2 additions and 0 deletions
|
@ -159,6 +159,8 @@ func (o *Operation) Run(handler interface{}) {
|
|||
register = o.resource.mux.Patch
|
||||
case http.MethodDelete:
|
||||
register = o.resource.mux.Delete
|
||||
default:
|
||||
panic(fmt.Errorf("Unknown HTTP verb: %s", o.method))
|
||||
}
|
||||
|
||||
t := reflect.TypeOf(handler)
|
||||
|
|
Loading…
Add table
Reference in a new issue