MCPcopy Index your code
hub / github.com/coder/coder / UpdateChatAutoArchiveDays

Method UpdateChatAutoArchiveDays

codersdk/chats.go:2708–2718  ·  view source on GitHub ↗

UpdateChatAutoArchiveDays updates the chat auto-archive period.

(ctx context.Context, req UpdateChatAutoArchiveDaysRequest)

Source from the content-addressed store, hash-verified

2706
2707// UpdateChatAutoArchiveDays updates the chat auto-archive period.
2708func (c *ExperimentalClient) UpdateChatAutoArchiveDays(ctx context.Context, req UpdateChatAutoArchiveDaysRequest) error {
2709 res, err := c.Request(ctx, http.MethodPut, "/api/experimental/chats/config/auto-archive-days", req)
2710 if err != nil {
2711 return err
2712 }
2713 defer res.Body.Close()
2714 if res.StatusCode != http.StatusNoContent {
2715 return ReadBodyAsError(res)
2716 }
2717 return nil
2718}
2719
2720// GetChatTemplateAllowlist returns the deployment-wide chat template allowlist.
2721func (c *ExperimentalClient) GetChatTemplateAllowlist(ctx context.Context) (ChatTemplateAllowlist, error) {

Callers 1

TestChatAutoArchiveDaysFunction · 0.95

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1

TestChatAutoArchiveDaysFunction · 0.76