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

Method GetChatAutoArchiveDays

codersdk/chats.go:2694–2705  ·  view source on GitHub ↗

GetChatAutoArchiveDays returns the configured chat auto-archive period.

(ctx context.Context)

Source from the content-addressed store, hash-verified

2692
2693// GetChatAutoArchiveDays returns the configured chat auto-archive period.
2694func (c *ExperimentalClient) GetChatAutoArchiveDays(ctx context.Context) (ChatAutoArchiveDaysResponse, error) {
2695 res, err := c.Request(ctx, http.MethodGet, "/api/experimental/chats/config/auto-archive-days", nil)
2696 if err != nil {
2697 return ChatAutoArchiveDaysResponse{}, err
2698 }
2699 defer res.Body.Close()
2700 if res.StatusCode != http.StatusOK {
2701 return ChatAutoArchiveDaysResponse{}, ReadBodyAsError(res)
2702 }
2703 var resp ChatAutoArchiveDaysResponse
2704 return resp, json.NewDecoder(res.Body).Decode(&resp)
2705}
2706
2707// UpdateChatAutoArchiveDays updates the chat auto-archive period.
2708func (c *ExperimentalClient) UpdateChatAutoArchiveDays(ctx context.Context, req UpdateChatAutoArchiveDaysRequest) error {

Callers 1

TestChatAutoArchiveDaysFunction · 0.95

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1

TestChatAutoArchiveDaysFunction · 0.76