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

Method GetChatDebugRetentionDays

coderd/database/dbauthz/dbauthz.go:2888–2897  ·  view source on GitHub ↗
(ctx context.Context, defaultDebugRetentionDays int32)

Source from the content-addressed store, hash-verified

2886}
2887
2888func (q *querier) GetChatDebugRetentionDays(ctx context.Context, defaultDebugRetentionDays int32) (int32, error) {
2889 // Chat debug retention is a deployment-wide config read by dbpurge.
2890 // Only requires a valid actor in context. The HTTP GET handler
2891 // allows any authenticated user; the PUT handler enforces admin
2892 // access (policy.ActionUpdate on ResourceDeploymentConfig).
2893 if _, ok := ActorFromContext(ctx); !ok {
2894 return 0, ErrNoActor
2895 }
2896 return q.db.GetChatDebugRetentionDays(ctx, defaultDebugRetentionDays)
2897}
2898
2899func (q *querier) GetChatDebugRunByID(ctx context.Context, id uuid.UUID) (database.ChatDebugRun, error) {
2900 run, err := q.db.GetChatDebugRunByID(ctx, id)

Callers

nothing calls this directly

Calls 2

ActorFromContextFunction · 0.70

Tested by

no test coverage detected