(ctx context.Context, defaultDebugRetentionDays int32)
| 2886 | } |
| 2887 | |
| 2888 | func (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 | |
| 2899 | func (q *querier) GetChatDebugRunByID(ctx context.Context, id uuid.UUID) (database.ChatDebugRun, error) { |
| 2900 | run, err := q.db.GetChatDebugRunByID(ctx, id) |
nothing calls this directly
no test coverage detected