Skip to content

Commit

Permalink
fix: remove hardcoded poison call
Browse files Browse the repository at this point in the history
  • Loading branch information
vanetix committed Mar 15, 2021
1 parent b5393dc commit f02be7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ex_aws/sts.ex
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,7 @@ defmodule ExAws.STS do
defp parse_opt(opts, {:serial_number, val}), do: Map.put(opts, "SerialNumber", val)
defp parse_opt(opts, {:provider_id, val}), do: Map.put(opts, "ProviderId", val)
defp parse_opt(opts, {:external_id, val}), do: Map.put(opts, "ExternalId", val)
defp parse_opt(opts, {:policy, val}), do: Map.put(opts, "Policy", Poison.encode!(val))
defp parse_opt(opts, {:policy, val}), do: Map.put(opts, "Policy", json_codec().encode!(val))

defp json_codec(), do: ExAws.Config.build_base(:sts) |> Map.get(:json_codec)
end

0 comments on commit f02be7c

Please sign in to comment.