(ctx context.Context, groupID uuid.UUID)
| 3486 | } |
| 3487 | |
| 3488 | func (q *querier) GetGroupAIBudget(ctx context.Context, groupID uuid.UUID) (database.GroupAiBudget, error) { |
| 3489 | // Reading a group's AI budget requires read on the parent group. |
| 3490 | group, err := q.db.GetGroupByID(ctx, groupID) |
| 3491 | if err != nil { |
| 3492 | return database.GroupAiBudget{}, err |
| 3493 | } |
| 3494 | if err := q.authorizeContext(ctx, policy.ActionRead, group); err != nil { |
| 3495 | return database.GroupAiBudget{}, err |
| 3496 | } |
| 3497 | return q.db.GetGroupAIBudget(ctx, groupID) |
| 3498 | } |
| 3499 | |
| 3500 | func (q *querier) GetGroupByID(ctx context.Context, id uuid.UUID) (database.Group, error) { |
| 3501 | return fetch(q.log, q.auth, q.db.GetGroupByID)(ctx, id) |
nothing calls this directly
no test coverage detected