(ctx context.Context, arg database.UpsertGroupAIBudgetParams)
| 8187 | } |
| 8188 | |
| 8189 | func (q *querier) UpsertGroupAIBudget(ctx context.Context, arg database.UpsertGroupAIBudgetParams) (database.GroupAiBudget, error) { |
| 8190 | // Setting a group's AI budget counts as updating the group. |
| 8191 | group, err := q.db.GetGroupByID(ctx, arg.GroupID) |
| 8192 | if err != nil { |
| 8193 | return database.GroupAiBudget{}, err |
| 8194 | } |
| 8195 | if err := q.authorizeContext(ctx, policy.ActionUpdate, group); err != nil { |
| 8196 | return database.GroupAiBudget{}, err |
| 8197 | } |
| 8198 | return q.db.UpsertGroupAIBudget(ctx, arg) |
| 8199 | } |
| 8200 | |
| 8201 | func (q *querier) UpsertHealthSettings(ctx context.Context, value string) error { |
| 8202 | if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceDeploymentConfig); err != nil { |
nothing calls this directly
no test coverage detected