| 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) |
| 355 | if err != nil { |
| 356 | return Template{}, err |
| 357 | } |
| 358 | defer res.Body.Close() |
| 359 | if res.StatusCode != http.StatusOK { |
| 360 | return Template{}, ReadBodyAsError(res) |
| 361 | } |
| 362 | var updated Template |
| 363 | return updated, json.NewDecoder(res.Body).Decode(&updated) |
| 364 | } |
| 365 | |
| 366 | func (c *Client) UpdateTemplateACL(ctx context.Context, templateID uuid.UUID, req UpdateTemplateACL) error { |
| 367 | res, err := c.Request(ctx, http.MethodPatch, fmt.Sprintf("/api/v2/templates/%s/acl", templateID), req) |