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

Method UnarchiveChatByID

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

Source from the content-addressed store, hash-verified

6491}
6492
6493func (q *querier) UnarchiveChatByID(ctx context.Context, id uuid.UUID) ([]database.Chat, error) {
6494 chat, err := q.db.GetChatByID(ctx, id)
6495 if err != nil {
6496 return nil, err
6497 }
6498 if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil {
6499 return nil, err
6500 }
6501 return q.db.UnarchiveChatByID(ctx, id)
6502}
6503
6504func (q *querier) UnarchiveTemplateVersion(ctx context.Context, arg database.UnarchiveTemplateVersionParams) error {
6505 v, err := q.db.GetTemplateVersionByID(ctx, arg.TemplateVersionID)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetChatByIDMethod · 0.65
UnarchiveChatByIDMethod · 0.65

Tested by

no test coverage detected