Skip to content

Commit

Permalink
roger: fix update not returning json
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Outhenin-Chalandre <[email protected]>
  • Loading branch information
MrFreezeex committed Jul 7, 2022
1 parent e968c9b commit 1b806c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cern/resource_roger.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func resourceRogerUpdate(ctx context.Context, d *schema.ResourceData, meta inter
}

log.Printf("[DEBUG] Creating roger update request for %s", request.Hostname)
_, err := client.Update(ctx, request)
err := client.Update(ctx, request)
if err != nil {
return diag.Errorf("Error updating roger state: %s", err)
}
Expand Down
5 changes: 3 additions & 2 deletions cern/util_roger.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ func (r Roger) Create(ctx context.Context, rogerRequest RogerRequest) error {
}

// Update a roger state
func (r Roger) Update(ctx context.Context, rogerRequest RogerRequest) (*RogerResponse, error) {
return r.do(ctx, rogerRequest, "PUT")
func (r Roger) Update(ctx context.Context, rogerRequest RogerRequest) error {
_, err := r.do(ctx, rogerRequest, "PUT")
return err
}

// Update a roger state
Expand Down

0 comments on commit 1b806c7

Please sign in to comment.