From d7f08dc5b1f243ef6a3e2b36a2c7936abb8b04c4 Mon Sep 17 00:00:00 2001 From: Alessio Biancalana Date: Thu, 24 Aug 2023 15:08:06 +0200 Subject: [PATCH] Update execution controller with target_type --- lib/wanda_web/controllers/v1/execution_controller.ex | 2 ++ lib/wanda_web/schemas/execution/start_execution_request.ex | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/wanda_web/controllers/v1/execution_controller.ex b/lib/wanda_web/controllers/v1/execution_controller.ex index 289124f0..09769845 100644 --- a/lib/wanda_web/controllers/v1/execution_controller.ex +++ b/lib/wanda_web/controllers/v1/execution_controller.ex @@ -114,6 +114,7 @@ defmodule WandaWeb.V1.ExecutionController do execution_id: execution_id, group_id: group_id, targets: targets, + target_type: target_type, env: env } = Map.get(conn, :body_params) @@ -122,6 +123,7 @@ defmodule WandaWeb.V1.ExecutionController do execution_id, group_id, Target.map_targets(targets), + target_type, env ) do conn diff --git a/lib/wanda_web/schemas/execution/start_execution_request.ex b/lib/wanda_web/schemas/execution/start_execution_request.ex index d5256538..4cfe331d 100644 --- a/lib/wanda_web/schemas/execution/start_execution_request.ex +++ b/lib/wanda_web/schemas/execution/start_execution_request.ex @@ -45,6 +45,7 @@ defmodule WandaWeb.Schemas.StartExecutionRequest do type: :array, items: Target }, + target_type: %Schema{type: :string, description: "Execution target type"}, env: Env }, required: [:execution_id, :group_id, :targets]