| 796 | } |
| 797 | |
| 798 | func (c *Client) UpdateWorkspaceACL(ctx context.Context, workspaceID uuid.UUID, req UpdateWorkspaceACL) error { |
| 799 | res, err := c.Request(ctx, http.MethodPatch, fmt.Sprintf("/api/v2/workspaces/%s/acl", workspaceID), req) |
| 800 | if err != nil { |
| 801 | return err |
| 802 | } |
| 803 | defer res.Body.Close() |
| 804 | if res.StatusCode != http.StatusNoContent { |
| 805 | return ReadBodyAsError(res) |
| 806 | } |
| 807 | return nil |
| 808 | } |
| 809 | |
| 810 | func (c *Client) DeleteWorkspaceACL(ctx context.Context, workspaceID uuid.UUID) error { |
| 811 | res, err := c.Request(ctx, http.MethodDelete, fmt.Sprintf("/api/v2/workspaces/%s/acl", workspaceID), nil) |