Commit ce2a6debbfc5987e6cc125dcdcbf80801b69d0b2

Stephen Moloney 2016-06-10T12:29:26

fix mix task bug. add binary key to /cloud requests on params.

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}