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

Method UpdateChatRetentionDays

codersdk/chats.go:2653–2663  ·  view source on GitHub ↗

UpdateChatRetentionDays updates the chat retention period.

(ctx context.Context, req UpdateChatRetentionDaysRequest)

Source from the content-addressed store, hash-verified

2651
2652// UpdateChatRetentionDays updates the chat retention period.
2653func (c *ExperimentalClient) UpdateChatRetentionDays(ctx context.Context, req UpdateChatRetentionDaysRequest) error {
2654 res, err := c.Request(ctx, http.MethodPut, "/api/experimental/chats/config/retention-days", req)
2655 if err != nil {
2656 return err
2657 }
2658 defer res.Body.Close()
2659 if res.StatusCode != http.StatusNoContent {
2660 return ReadBodyAsError(res)
2661 }
2662 return nil
2663}
2664
2665// GetChatDebugRetentionDays returns the configured chat debug run
2666// retention period.

Callers 1

TestChatRetentionDaysFunction · 0.95

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1

TestChatRetentionDaysFunction · 0.76