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

Method UpdateChatStatus

coderd/database/dbauthz/dbauthz.go:6758–6769  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpdateChatStatusParams)

Source from the content-addressed store, hash-verified

6756}
6757
6758func (q *querier) UpdateChatStatus(ctx context.Context, arg database.UpdateChatStatusParams) (database.Chat, error) {
6759 // UpdateChatStatus is used by the chat processor to change chat status.
6760 // It should be called with system context.
6761 chat, err := q.db.GetChatByID(ctx, arg.ID)
6762 if err != nil {
6763 return database.Chat{}, err
6764 }
6765 if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil {
6766 return database.Chat{}, err
6767 }
6768 return q.db.UpdateChatStatus(ctx, arg)
6769}
6770
6771func (q *querier) UpdateChatStatusPreserveUpdatedAt(ctx context.Context, arg database.UpdateChatStatusPreserveUpdatedAtParams) (database.Chat, error) {
6772 chat, err := q.db.GetChatByID(ctx, arg.ID)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetChatByIDMethod · 0.65
UpdateChatStatusMethod · 0.65

Tested by

no test coverage detected