mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Fixing a bug where Reads() was called twice on all POST routes
This commit is contained in:
parent
790a78415e
commit
54e5d1f102
@ -128,8 +128,7 @@ func registerResourceHandlers(ws *restful.WebService, version string, path strin
|
||||
|
||||
createRoute := ws.POST(path).To(h).
|
||||
Doc("create a " + kind).
|
||||
Operation("create" + kind).
|
||||
Reads(versionedObject) // from the request
|
||||
Operation("create" + kind)
|
||||
addParamIf(createRoute, namespaceParam, namespaceScope)
|
||||
if _, ok := storage.(RESTCreater); ok {
|
||||
ws.Route(createRoute.Reads(versionedObject)) // from the request
|
||||
|
Loading…
Reference in New Issue
Block a user