(ctx context.Context, raw json.RawMessage)
| 1452 | } |
| 1453 | |
| 1454 | func (h *HostAPIHandler) handleAutomationJobsCreate(ctx context.Context, raw json.RawMessage) (any, error) { |
| 1455 | automation, err := h.automationManager() |
| 1456 | if err != nil { |
| 1457 | return nil, err |
| 1458 | } |
| 1459 | |
| 1460 | var params hostAPIAutomationJobCreateParams |
| 1461 | if err := decodeHostAPIParams(raw, ¶ms); err != nil { |
| 1462 | return nil, err |
| 1463 | } |
| 1464 | |
| 1465 | job, err := h.jobFromCreateParams(ctx, params) |
| 1466 | if err != nil { |
| 1467 | return nil, err |
| 1468 | } |
| 1469 | if err := job.Validate("job"); err != nil { |
| 1470 | return nil, invalidParamsRPCError(err) |
| 1471 | } |
| 1472 | |
| 1473 | return automation.CreateJob(ctx, job) |
| 1474 | } |
| 1475 | |
| 1476 | func (h *HostAPIHandler) handleAutomationJobsUpdate(ctx context.Context, raw json.RawMessage) (any, error) { |
| 1477 | automation, err := h.automationManager() |
nothing calls this directly
no test coverage detected