diff --git a/src/hex_api_release.erl b/src/hex_api_release.erl index d60b24f..763a085 100644 --- a/src/hex_api_release.erl +++ b/src/hex_api_release.erl @@ -143,10 +143,18 @@ delete(Config, Name, Version) when is_map(Config) and is_binary(Name) and is_bin %% ''' %% @end -spec retire(hex_core:config(), binary(), binary(), retirement_params()) -> hex_api:response(). -retire(Config, Name, Version, Params) when +retire(Config, Name, Version, Params0) when is_map(Config) and is_binary(Name) and is_binary(Version) -> Path = hex_api:build_repository_path(Config, ["packages", Name, "releases", Version, "retire"]), + Params = maps:fold( + fun (K, V, AccIn) -> + AccIn#{ + atom_to_binary(K) => V + } + end, + #{}, + Params0), hex_api:post(Config, Path, Params). %% @doc