diff options
author | Mark Felder <feld@feld.me> | 2021-01-21 14:41:28 -0600 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2021-01-21 14:41:28 -0600 |
commit | e5b32aab92444ea1b4c5ec9e5e78cfcc909aaa73 (patch) | |
tree | 17070021bbe8c547cd7c5d42acb19c7a23182f2a | |
parent | 003402df401f2bbf46e47017e3b7a2ec27615ea2 (diff) | |
download | pleroma-e5b32aab92444ea1b4c5ec9e5e78cfcc909aaa73.tar.gz pleroma-e5b32aab92444ea1b4c5ec9e5e78cfcc909aaa73.zip |
rename function
-rw-r--r-- | lib/pleroma/web/media_proxy/invalidation/script.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/web/media_proxy/invalidation/script.ex b/lib/pleroma/web/media_proxy/invalidation/script.ex index c447614fa..87a21166c 100644 --- a/lib/pleroma/web/media_proxy/invalidation/script.ex +++ b/lib/pleroma/web/media_proxy/invalidation/script.ex @@ -13,7 +13,7 @@ defmodule Pleroma.Web.MediaProxy.Invalidation.Script do def purge(urls, opts \\ []) do args = urls - |> format_urls(Keyword.get(opts, :url_format)) + |> maybe_format_urls(Keyword.get(opts, :url_format)) |> List.wrap() |> Enum.uniq() |> Enum.join(" ") @@ -42,7 +42,7 @@ defmodule Pleroma.Web.MediaProxy.Invalidation.Script do {:error, inspect(error)} end - def format_urls(urls, :htcacheclean) do + def maybe_format_urls(urls, :htcacheclean) do urls |> Enum.map(fn url -> uri = URI.parse(url) @@ -58,5 +58,5 @@ defmodule Pleroma.Web.MediaProxy.Invalidation.Script do end) end - def format_urls(urls, _), do: urls + def maybe_format_urls(urls, _), do: urls end |