1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-17 15:58:41 +00:00

adding gvk completion to update method in proxy_store

This commit is contained in:
Felipe C. Gehrke
2024-08-30 19:11:50 -03:00
parent ea6c83b279
commit 0fcf47917b

View File

@@ -505,6 +505,9 @@ func (s *Store) Update(apiOp *types.APIRequest, schema *types.APISchema, params
return nil, nil, fmt.Errorf("metadata.resourceVersion is required for update") return nil, nil, fmt.Errorf("metadata.resourceVersion is required for update")
} }
gvk := attributes.GVK(schema)
input["apiVersion"], input["kind"] = gvk.ToAPIVersionAndKind()
opts := metav1.UpdateOptions{} opts := metav1.UpdateOptions{}
if err := decodeParams(apiOp, &opts); err != nil { if err := decodeParams(apiOp, &opts); err != nil {
return nil, nil, err return nil, nil, err