diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-06-05 14:48:02 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-06-05 14:48:02 +0000 |
commit | 54bae06b4fa960eadb9918414f50b9ececc1faa4 (patch) | |
tree | 4baf1d3c36d8e3a1a9f2c678b2e9965de16e468d /lib/pleroma/helpers | |
parent | f5cb1f3616e9cb9430038697532eb49161937dec (diff) | |
download | pleroma-54bae06b4fa960eadb9918414f50b9ececc1faa4.tar.gz |
Create Pleroma.Maps.put_if_present(map, key, value, value_fun // &{:ok, &1})
Unifies all the similar functions to one and simplify some blocks with it.
Diffstat (limited to 'lib/pleroma/helpers')
-rw-r--r-- | lib/pleroma/helpers/uri_helper.ex | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/pleroma/helpers/uri_helper.ex b/lib/pleroma/helpers/uri_helper.ex index 69d8c8fe0..6d205a636 100644 --- a/lib/pleroma/helpers/uri_helper.ex +++ b/lib/pleroma/helpers/uri_helper.ex @@ -17,14 +17,6 @@ defmodule Pleroma.Helpers.UriHelper do |> URI.to_string() end - def append_param_if_present(%{} = params, param_name, param_value) do - if param_value do - Map.put(params, param_name, param_value) - else - params - end - end - def maybe_add_base("/" <> uri, base), do: Path.join([base, uri]) def maybe_add_base(uri, _base), do: uri end |