Skip to content

Commit

Permalink
Rename DatabaseUserPasswordReset to DatabaseUserResetPassword
Browse files Browse the repository at this point in the history
  • Loading branch information
sc-zenokerr committed Jul 4, 2024
1 parent 867968d commit c277503
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## To Be Released

* feat(apps): add the `private_network_ids` field to the model
* feat(database/users): add the `DatabaseUserPasswordReset` method
* feat(database/users): add the `DatabaseUserResetPassword` method

## 7.0.0

Expand Down
6 changes: 3 additions & 3 deletions databases.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,13 @@ func (c *Client) DatabaseDeleteUser(ctx context.Context, app, addonID, userName
return c.DBAPI(app, addonID).SubresourceDelete(ctx, "databases", addonID, "users", userName)
}

// DatabaseUserPasswordReset resets the password for a user for given database addon
func (c *Client) DatabaseUserPasswordReset(ctx context.Context, app, addonID, username string) (DatabaseUser, error) {
// DatabaseUserResetPassword resets the password for a user for given database addon
func (c *Client) DatabaseUserResetPassword(ctx context.Context, app, addonID, username string) (DatabaseUser, error) {
res := DatabaseUserResponse{}
req := &httpclient.APIRequest{
Method: "PATCH",
Endpoint: "/databases/" + addonID + "/users/" + username + "/reset_password",
Expected: httpclient.Statuses{200},
Expected: httpclient.Statuses{http.StatusOK},
}
err := c.DBAPI(app, addonID).DoRequest(ctx, req, &res)
if err != nil {
Expand Down

0 comments on commit c277503

Please sign in to comment.