(ctx context.Context, raw json.RawMessage)
| 1435 | } |
| 1436 | |
| 1437 | func (h *HostAPIHandler) handleAutomationJobsGet(ctx context.Context, raw json.RawMessage) (any, error) { |
| 1438 | automation, err := h.automationManager() |
| 1439 | if err != nil { |
| 1440 | return nil, err |
| 1441 | } |
| 1442 | |
| 1443 | var params hostAPIAutomationTargetParams |
| 1444 | if err := decodeHostAPIParams(raw, ¶ms); err != nil { |
| 1445 | return nil, err |
| 1446 | } |
| 1447 | if strings.TrimSpace(params.ID) == "" { |
| 1448 | return nil, invalidParamsRPCError(errors.New("id is required")) |
| 1449 | } |
| 1450 | |
| 1451 | return automation.GetJob(ctx, params.ID) |
| 1452 | } |
| 1453 | |
| 1454 | func (h *HostAPIHandler) handleAutomationJobsCreate(ctx context.Context, raw json.RawMessage) (any, error) { |
| 1455 | automation, err := h.automationManager() |
nothing calls this directly
no test coverage detected