(ctx context.Context, arg database.UpdateTaskPromptParams)
| 7201 | } |
| 7202 | |
| 7203 | func (q *querier) UpdateTaskPrompt(ctx context.Context, arg database.UpdateTaskPromptParams) (database.TaskTable, error) { |
| 7204 | // An actor is allowed to update the prompt of a task if they have |
| 7205 | // permission to update the task (same as UpdateTaskWorkspaceID). |
| 7206 | task, err := q.db.GetTaskByID(ctx, arg.ID) |
| 7207 | if err != nil { |
| 7208 | return database.TaskTable{}, err |
| 7209 | } |
| 7210 | |
| 7211 | if err := q.authorizeContext(ctx, policy.ActionUpdate, task.RBACObject()); err != nil { |
| 7212 | return database.TaskTable{}, err |
| 7213 | } |
| 7214 | |
| 7215 | return q.db.UpdateTaskPrompt(ctx, arg) |
| 7216 | } |
| 7217 | |
| 7218 | func (q *querier) UpdateTaskWorkspaceID(ctx context.Context, arg database.UpdateTaskWorkspaceIDParams) (database.TaskTable, error) { |
| 7219 | // An actor is allowed to update the workspace ID of a task if they are the |
nothing calls this directly
no test coverage detected