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

Method ArchiveChatByID

coderd/database/dbauthz/dbauthz.go:1633–1642  ·  view source on GitHub ↗
(ctx context.Context, id uuid.UUID)

Source from the content-addressed store, hash-verified

1631}
1632
1633func (q *querier) ArchiveChatByID(ctx context.Context, id uuid.UUID) ([]database.Chat, error) {
1634 chat, err := q.db.GetChatByID(ctx, id)
1635 if err != nil {
1636 return nil, err
1637 }
1638 if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil {
1639 return nil, err
1640 }
1641 return q.db.ArchiveChatByID(ctx, id)
1642}
1643
1644func (q *querier) ArchiveUnusedTemplateVersions(ctx context.Context, arg database.ArchiveUnusedTemplateVersionsParams) ([]uuid.UUID, error) {
1645 tpl, err := q.db.GetTemplateByID(ctx, arg.TemplateID)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetChatByIDMethod · 0.65
ArchiveChatByIDMethod · 0.65

Tested by

no test coverage detected