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

Method UpsertChatDiffStatus

coderd/database/dbauthz/dbauthz.go:8066–8076  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpsertChatDiffStatusParams)

Source from the content-addressed store, hash-verified

8064}
8065
8066func (q *querier) UpsertChatDiffStatus(ctx context.Context, arg database.UpsertChatDiffStatusParams) (database.ChatDiffStatus, error) {
8067 // Authorize update on the parent chat.
8068 chat, err := q.db.GetChatByID(ctx, arg.ChatID)
8069 if err != nil {
8070 return database.ChatDiffStatus{}, err
8071 }
8072 if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil {
8073 return database.ChatDiffStatus{}, err
8074 }
8075 return q.db.UpsertChatDiffStatus(ctx, arg)
8076}
8077
8078func (q *querier) UpsertChatDiffStatusReference(ctx context.Context, arg database.UpsertChatDiffStatusReferenceParams) (database.ChatDiffStatus, error) {
8079 // Authorize update on the parent chat.

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetChatByIDMethod · 0.65
UpsertChatDiffStatusMethod · 0.65

Tested by

no test coverage detected