UpdateUserPassword updates a user password. It calls PUT /users/{user}/password
(ctx context.Context, user string, req UpdateUserPasswordRequest)
| 696 | // UpdateUserPassword updates a user password. |
| 697 | // It calls PUT /users/{user}/password |
| 698 | func (c *Client) UpdateUserPassword(ctx context.Context, user string, req UpdateUserPasswordRequest) error { |
| 699 | res, err := c.Request(ctx, http.MethodPut, fmt.Sprintf("/api/v2/users/%s/password", user), req) |
| 700 | if err != nil { |
| 701 | return err |
| 702 | } |
| 703 | defer res.Body.Close() |
| 704 | if res.StatusCode != http.StatusNoContent { |
| 705 | return ReadBodyAsError(res) |
| 706 | } |
| 707 | return nil |
| 708 | } |
| 709 | |
| 710 | // PostOrganizationMember adds a user to an organization |
| 711 | func (c *Client) PostOrganizationMember(ctx context.Context, organizationID uuid.UUID, user string) (OrganizationMember, error) { |