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

Method UpdateChatByID

coderd/database/dbauthz/dbauthz.go:6603–6612  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpdateChatByIDParams)

Source from the content-addressed store, hash-verified

6601}
6602
6603func (q *querier) UpdateChatByID(ctx context.Context, arg database.UpdateChatByIDParams) (database.Chat, error) {
6604 chat, err := q.db.GetChatByID(ctx, arg.ID)
6605 if err != nil {
6606 return database.Chat{}, err
6607 }
6608 if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil {
6609 return database.Chat{}, err
6610 }
6611 return q.db.UpdateChatByID(ctx, arg)
6612}
6613
6614func (q *querier) UpdateChatDebugRun(ctx context.Context, arg database.UpdateChatDebugRunParams) (database.ChatDebugRun, error) {
6615 chat, err := q.db.GetChatByID(ctx, arg.ChatID)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetChatByIDMethod · 0.65
UpdateChatByIDMethod · 0.65

Tested by

no test coverage detected