Skip to content

Commit

Permalink
add component update method
Browse files Browse the repository at this point in the history
Signed-off-by: spyros <morfeas3000@gmail.com>
  • Loading branch information
northdpole committed Oct 16, 2023
1 parent 9894000 commit 335506c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions component.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,14 @@ func (cs ComponentService) Create(ctx context.Context, projectUUID string, compo
_, err = cs.client.doRequest(req, &c)
return
}

func (cs ComponentService) Update(ctx context.Context, component Component) (c Component, err error) {
req, err := cs.client.newRequest(ctx, http.MethodPost,
"/api/v1/component",
withBody(component))
if err != nil {
return
}
_, err = cs.client.doRequest(req, &c)
return
}

0 comments on commit 335506c

Please sign in to comment.