(ctx context.Context, arg database.GetChatsParams)
| 3269 | } |
| 3270 | |
| 3271 | func (q *querier) GetChats(ctx context.Context, arg database.GetChatsParams) ([]database.GetChatsRow, error) { |
| 3272 | prep, err := prepareSQLFilter(ctx, q.auth, policy.ActionRead, rbac.ResourceChat.Type) |
| 3273 | if err != nil { |
| 3274 | return nil, xerrors.Errorf("(dev error) prepare sql filter: %w", err) |
| 3275 | } |
| 3276 | return q.db.GetAuthorizedChats(ctx, arg, prep) |
| 3277 | } |
| 3278 | |
| 3279 | func (q *querier) GetChatsByChatFileID(ctx context.Context, fileID uuid.UUID) ([]database.Chat, error) { |
| 3280 | return fetchWithPostFilter(q.auth, policy.ActionRead, q.db.GetChatsByChatFileID)(ctx, fileID) |
no test coverage detected