(ctx context.Context, arg database.InsertChatQueuedMessageParams)
| 5524 | } |
| 5525 | |
| 5526 | func (q *querier) InsertChatQueuedMessage(ctx context.Context, arg database.InsertChatQueuedMessageParams) (database.ChatQueuedMessage, error) { |
| 5527 | chat, err := q.db.GetChatByID(ctx, arg.ChatID) |
| 5528 | if err != nil { |
| 5529 | return database.ChatQueuedMessage{}, err |
| 5530 | } |
| 5531 | if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil { |
| 5532 | return database.ChatQueuedMessage{}, err |
| 5533 | } |
| 5534 | return q.db.InsertChatQueuedMessage(ctx, arg) |
| 5535 | } |
| 5536 | |
| 5537 | func (q *querier) InsertCryptoKey(ctx context.Context, arg database.InsertCryptoKeyParams) (database.CryptoKey, error) { |
| 5538 | if err := q.authorizeContext(ctx, policy.ActionCreate, rbac.ResourceCryptoKey); err != nil { |
nothing calls this directly
no test coverage detected