diff --git a/vendor/github.com/nicolai86/scaleway-sdk/user.go b/vendor/github.com/nicolai86/scaleway-sdk/user.go index d7f94c1ce..7156c4e3e 100644 --- a/vendor/github.com/nicolai86/scaleway-sdk/user.go +++ b/vendor/github.com/nicolai86/scaleway-sdk/user.go @@ -62,18 +62,24 @@ type UserPatchSSHKeyDefinition struct { } // PatchUserSSHKey updates a user -func (s *API) PatchUserSSHKey(UserID string, definition UserPatchSSHKeyDefinition) error { +func (s *API) PatchUserSSHKey(UserID string, definition UserPatchSSHKeyDefinition) (*UserDefinition, error) { resp, err := s.PatchResponse(AccountAPI, fmt.Sprintf("users/%s", UserID), definition) if err != nil { - return err + return nil, err } defer resp.Body.Close() - if _, err := s.handleHTTPError([]int{http.StatusOK}, resp); err != nil { - return err + body, err := s.handleHTTPError([]int{http.StatusOK}, resp) + if err != nil { + return nil, err + } + var user UsersDefinition + + if err = json.Unmarshal(body, &user); err != nil { + return nil, err } - return nil + return &user.User, nil } // GetUserID returns the userID diff --git a/vendor/vendor.json b/vendor/vendor.json index 6968c620e..ad6da75d2 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -558,10 +558,10 @@ "revisionTime": "2016-10-03T17:45:16Z" }, { - "checksumSHA1": "7ILxxEwddNgVCzVHzLCnPJfEBWg=", + "checksumSHA1": "HHM/BHbGWERr3u0mwCsj+587zBY=", "path": "github.com/nicolai86/scaleway-sdk", - "revision": "6ef8f978a49b7615d7bf9c4f0d2e651f42a41852", - "revisionTime": "2018-02-27T05:29:25Z" + "revision": "1a18b6a1c6a3434c88b908254958f1281cf3ac2c", + "revisionTime": "2018-03-15T02:26:51Z" }, { "checksumSHA1": "u5s2PZ7fzCOqQX7bVPf9IJ+qNLQ=",