(ctx context.Context, raw json.RawMessage)
| 1541 | } |
| 1542 | |
| 1543 | func (h *HostAPIHandler) handleAutomationJobsTrigger(ctx context.Context, raw json.RawMessage) (any, error) { |
| 1544 | automation, err := h.automationManager() |
| 1545 | if err != nil { |
| 1546 | return nil, err |
| 1547 | } |
| 1548 | |
| 1549 | var params hostAPIAutomationJobTriggerParams |
| 1550 | if err := decodeHostAPIParams(raw, ¶ms); err != nil { |
| 1551 | return nil, err |
| 1552 | } |
| 1553 | if strings.TrimSpace(params.ID) == "" { |
| 1554 | return nil, invalidParamsRPCError(errors.New("id is required")) |
| 1555 | } |
| 1556 | |
| 1557 | return automation.TriggerJobWithPayload(ctx, params.ID, params.Payload) |
| 1558 | } |
| 1559 | |
| 1560 | func (h *HostAPIHandler) handleAutomationJobsRuns(ctx context.Context, raw json.RawMessage) (any, error) { |
| 1561 | automation, err := h.automationManager() |
nothing calls this directly
no test coverage detected