Skip to content

Commit

Permalink
fix: wrong apiVersion and resource in Widget action call uri (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasepe authored Nov 18, 2024
1 parent 15c96dd commit b811237
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions internal/resolvers/templates/actions/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func Resolve(ctx context.Context, opts ResolveOptions) (all []*templates.Action)
all = append(all, &templates.Action{
Verb: verb,
Path: fmt.Sprintf("/call?resource=%s&apiVersion=%s&name=%s&namespace=%s",
gvr.Resource, gvr.GroupVersion().String(), ref.Name, ref.Namespace),
ref.Resource, ref.APIVersion, ref.Name, ref.Namespace),
})
}
}
Expand Down Expand Up @@ -172,14 +172,3 @@ func render(opts renderOptions) (all []*templates.ObjectReference) {

return
}

func toObjectReference(in *templates.ActionTemplate) *templates.ObjectReference {
return &templates.ObjectReference{
Reference: templates.Reference{
Name: in.Template.Reference.Name,
Namespace: in.Template.Reference.Namespace,
},
Resource: in.Template.Resource,
APIVersion: in.Template.APIVersion,
}
}

0 comments on commit b811237

Please sign in to comment.