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

Method GetChatDebugRunByID

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

Source from the content-addressed store, hash-verified

2897}
2898
2899func (q *querier) GetChatDebugRunByID(ctx context.Context, id uuid.UUID) (database.ChatDebugRun, error) {
2900 run, err := q.db.GetChatDebugRunByID(ctx, id)
2901 if err != nil {
2902 return database.ChatDebugRun{}, err
2903 }
2904 // Authorize via the owning chat.
2905 chat, err := q.db.GetChatByID(ctx, run.ChatID)
2906 if err != nil {
2907 return database.ChatDebugRun{}, err
2908 }
2909 if err := q.authorizeContext(ctx, policy.ActionRead, chat); err != nil {
2910 return database.ChatDebugRun{}, err
2911 }
2912 return run, nil
2913}
2914
2915func (q *querier) GetChatDebugRunsByChatID(ctx context.Context, arg database.GetChatDebugRunsByChatIDParams) ([]database.ChatDebugRun, error) {
2916 chat, err := q.db.GetChatByID(ctx, arg.ChatID)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetChatDebugRunByIDMethod · 0.65
GetChatByIDMethod · 0.65

Tested by

no test coverage detected