| 339 | } |
| 340 | |
| 341 | func (c *Client) DeleteTemplate(ctx context.Context, template uuid.UUID) error { |
| 342 | res, err := c.Request(ctx, http.MethodDelete, fmt.Sprintf("/api/v2/templates/%s", template), nil) |
| 343 | if err != nil { |
| 344 | return err |
| 345 | } |
| 346 | defer res.Body.Close() |
| 347 | if res.StatusCode != http.StatusOK { |
| 348 | return ReadBodyAsError(res) |
| 349 | } |
| 350 | return nil |
| 351 | } |
| 352 | |
| 353 | func (c *Client) UpdateTemplateMeta(ctx context.Context, templateID uuid.UUID, req UpdateTemplateMeta) (Template, error) { |
| 354 | res, err := c.Request(ctx, http.MethodPatch, fmt.Sprintf("/api/v2/templates/%s", templateID), req) |