fix mix task bug. add binary key to /cloud requests on params.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/lib/ex_ovh/services/v1/cloud/cloudstorage/query.ex b/lib/ex_ovh/services/v1/cloud/cloudstorage/query.ex
index 3255bb0..d588cd4 100644
--- a/lib/ex_ovh/services/v1/cloud/cloudstorage/query.ex
+++ b/lib/ex_ovh/services/v1/cloud/cloudstorage/query.ex
@@ -54,9 +54,11 @@ defmodule ExOvh.Services.V1.Cloud.Cloudstorage.Query do
method: :post,
uri: "/cloud/project/#{service_name}/storage",
params: %{
- "containerName" => container_name,
- "region" => region
- } |> Poison.encode!()
+ binary: %{
+ "containerName" => container_name,
+ "region" => region
+ } |> Poison.encode!()
+ }
}
end
@@ -191,8 +193,10 @@ defmodule ExOvh.Services.V1.Cloud.Cloudstorage.Query do
method: :post,
uri: "/cloud/project/#{service_name}/storage/#{container_id}/cors",
params: %{
- "origin" => origin
- } |> Poison.encode!()
+ binary: %{
+ "origin" => origin
+ } |> Poison.encode!()
+ }
}
end
diff --git a/lib/mix/tasks/ovh.ex b/lib/mix/tasks/ovh.ex
index 04f3dff..7ed7460 100644
--- a/lib/mix/tasks/ovh.ex
+++ b/lib/mix/tasks/ovh.ex
@@ -319,7 +319,7 @@ defmodule Mix.Tasks.Ovh do
name_val = :proplists.get_value("name", input)
value = password
{name_val, value}
- type == "input" && {"type", "text"} in input && {"placeholder", "Account ID"} in input ->
+ type == "input" && {"type", "text"} in input && {"placeholder", "Account ID or email address"} in input ->
name_val = :proplists.get_value("name", input)
value = login
{name_val, value}