(ctx context.Context, arg database.GetChatCostPerModelParams)
| 2853 | } |
| 2854 | |
| 2855 | func (q *querier) GetChatCostPerModel(ctx context.Context, arg database.GetChatCostPerModelParams) ([]database.GetChatCostPerModelRow, error) { |
| 2856 | // See GetChatCostPerChat for the authorization rationale. |
| 2857 | if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceChat.WithOwner(arg.OwnerID.String()).AnyOrganization()); err != nil { |
| 2858 | return nil, err |
| 2859 | } |
| 2860 | return q.db.GetChatCostPerModel(ctx, arg) |
| 2861 | } |
| 2862 | |
| 2863 | func (q *querier) GetChatCostPerUser(ctx context.Context, arg database.GetChatCostPerUserParams) ([]database.GetChatCostPerUserRow, error) { |
| 2864 | if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceChat); err != nil { |
nothing calls this directly
no test coverage detected