| 683 | } |
| 684 | |
| 685 | func (c *Client) ResolveAutostart(ctx context.Context, workspaceID string) (ResolveAutostartResponse, error) { |
| 686 | res, err := c.Request(ctx, http.MethodGet, fmt.Sprintf("/api/v2/workspaces/%s/resolve-autostart", workspaceID), nil) |
| 687 | if err != nil { |
| 688 | return ResolveAutostartResponse{}, err |
| 689 | } |
| 690 | defer res.Body.Close() |
| 691 | if res.StatusCode != http.StatusOK { |
| 692 | return ResolveAutostartResponse{}, ReadBodyAsError(res) |
| 693 | } |
| 694 | var response ResolveAutostartResponse |
| 695 | return response, json.NewDecoder(res.Body).Decode(&response) |
| 696 | } |
| 697 | |
| 698 | func (c *Client) FavoriteWorkspace(ctx context.Context, workspaceID uuid.UUID) error { |
| 699 | res, err := c.Request(ctx, http.MethodPut, fmt.Sprintf("/api/v2/workspaces/%s/favorite", workspaceID), nil) |