Commit 54e5d1f1 authored by nikhiljindal's avatar nikhiljindal

Fixing a bug where Reads() was called twice on all POST routes

parent 790a7841
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment