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

Method UpdateChatStatusPreserveUpdatedAt

coderd/database/dbauthz/dbauthz.go:6771–6780  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpdateChatStatusPreserveUpdatedAtParams)

Source from the content-addressed store, hash-verified

6769}
6770
6771func (q *querier) UpdateChatStatusPreserveUpdatedAt(ctx context.Context, arg database.UpdateChatStatusPreserveUpdatedAtParams) (database.Chat, error) {
6772 chat, err := q.db.GetChatByID(ctx, arg.ID)
6773 if err != nil {
6774 return database.Chat{}, err
6775 }
6776 if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil {
6777 return database.Chat{}, err
6778 }
6779 return q.db.UpdateChatStatusPreserveUpdatedAt(ctx, arg)
6780}
6781
6782func (q *querier) UpdateChatTitleByID(ctx context.Context, arg database.UpdateChatTitleByIDParams) (database.Chat, error) {
6783 chat, err := q.db.GetChatByID(ctx, arg.ID)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetChatByIDMethod · 0.65

Tested by

no test coverage detected