(ctx context.Context, chatID uuid.UUID)
| 3122 | } |
| 3123 | |
| 3124 | func (q *querier) GetChatMessagesForPromptByChatID(ctx context.Context, chatID uuid.UUID) ([]database.ChatMessage, error) { |
| 3125 | // Authorize read on the parent chat. |
| 3126 | _, err := q.GetChatByID(ctx, chatID) |
| 3127 | if err != nil { |
| 3128 | return nil, err |
| 3129 | } |
| 3130 | return q.db.GetChatMessagesForPromptByChatID(ctx, chatID) |
| 3131 | } |
| 3132 | |
| 3133 | func (q *querier) GetChatModelConfigByID(ctx context.Context, id uuid.UUID) (database.ChatModelConfig, error) { |
| 3134 | if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceDeploymentConfig); err != nil { |
nothing calls this directly
no test coverage detected