     |> Repo.all
     |> Enum.map &Map.from_struct/1 
 
-    conn
-    |> json clusters
+    json conn, clusters
   end
   
 end


  # PUT "/:id"
  def update(conn, %{"id" => id} = params) do
    Repo.get(CloudProvider, id)
    |> case do
      nil ->
        conn
        |> resp :not_found, ""

  end

  def destroy(conn, %{"id" => id}) do
    case Repo.get(CloudProvider, id) do
      nil ->
        conn
        |> resp :not_found, ""
