(ctx context.Context, arg database.InsertChatMessagesParams)
| 5505 | } |
| 5506 | |
| 5507 | func (q *querier) InsertChatMessages(ctx context.Context, arg database.InsertChatMessagesParams) ([]database.ChatMessage, error) { |
| 5508 | // Authorize create on the parent chat (using update permission). |
| 5509 | chat, err := q.db.GetChatByID(ctx, arg.ChatID) |
| 5510 | if err != nil { |
| 5511 | return nil, err |
| 5512 | } |
| 5513 | if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil { |
| 5514 | return nil, err |
| 5515 | } |
| 5516 | return q.db.InsertChatMessages(ctx, arg) |
| 5517 | } |
| 5518 | |
| 5519 | func (q *querier) InsertChatModelConfig(ctx context.Context, arg database.InsertChatModelConfigParams) (database.ChatModelConfig, error) { |
| 5520 | if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceDeploymentConfig); err != nil { |
nothing calls this directly
no test coverage detected