diff --git a/lib/pleroma/language/translation/deepl.ex b/lib/pleroma/language/translation/deepl.ex index 7771c8fe17..f43abb1c0d 100644 --- a/lib/pleroma/language/translation/deepl.ex +++ b/lib/pleroma/language/translation/deepl.ex @@ -16,7 +16,7 @@ def configured? do @impl Provider def translate(content, source_language, target_language) do - endpoint = get_base_url() + endpoint = get_endpoint() case Pleroma.HTTP.post( endpoint <> @@ -58,6 +58,10 @@ def translate(content, source_language, target_language) do end end + defp get_endpoint do + URI.merge(get_base_url(), "/v2/translate") + end + defp get_base_url do Pleroma.Config.get([__MODULE__, :base_url]) end