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

Method GetChatACL

codersdk/chats.go:3059–3070  ·  view source on GitHub ↗
(ctx context.Context, chatID uuid.UUID)

Source from the content-addressed store, hash-verified

3057}
3058
3059func (c *ExperimentalClient) GetChatACL(ctx context.Context, chatID uuid.UUID) (ChatACL, error) {
3060 res, err := c.Request(ctx, http.MethodGet, fmt.Sprintf("/api/experimental/chats/%s/acl", chatID), nil)
3061 if err != nil {
3062 return ChatACL{}, err
3063 }
3064 defer res.Body.Close()
3065 if res.StatusCode != http.StatusOK {
3066 return ChatACL{}, ReadBodyAsError(res)
3067 }
3068 var acl ChatACL
3069 return acl, json.NewDecoder(res.Body).Decode(&acl)
3070}
3071
3072func (c *ExperimentalClient) UpdateChatACL(ctx context.Context, chatID uuid.UUID, req UpdateChatACL) error {
3073 res, err := c.Request(ctx, http.MethodPatch, fmt.Sprintf("/api/experimental/chats/%s/acl", chatID), req)

Callers 3

TestChatSharingDisabledFunction · 0.80

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 3

TestChatSharingDisabledFunction · 0.64