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

This commit is contained in:
nikhiljindal 2015-01-26 17:21:25 -08:00
parent 790a78415e
commit 54e5d1f102

View File

@ -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