(ctx context.Context, arg database.UpdateWorkspaceAgentStartupByIDParams)
| 7806 | } |
| 7807 | |
| 7808 | func (q *querier) UpdateWorkspaceAgentStartupByID(ctx context.Context, arg database.UpdateWorkspaceAgentStartupByIDParams) error { |
| 7809 | agent, err := q.db.GetWorkspaceAgentByID(ctx, arg.ID) |
| 7810 | if err != nil { |
| 7811 | return err |
| 7812 | } |
| 7813 | |
| 7814 | workspace, err := q.db.GetWorkspaceByAgentID(ctx, agent.ID) |
| 7815 | if err != nil { |
| 7816 | return err |
| 7817 | } |
| 7818 | |
| 7819 | if err := q.authorizeContext(ctx, policy.ActionUpdate, workspace); err != nil { |
| 7820 | return err |
| 7821 | } |
| 7822 | |
| 7823 | return q.db.UpdateWorkspaceAgentStartupByID(ctx, arg) |
| 7824 | } |
| 7825 | |
| 7826 | func (q *querier) UpdateWorkspaceAppHealthByID(ctx context.Context, arg database.UpdateWorkspaceAppHealthByIDParams) error { |
| 7827 | // TODO: This is a workspace agent operation. Should users be able to query this? |
nothing calls this directly
no test coverage detected