config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
-config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
-
if File.exists?("./config/test.secret.exs") do
import_config "test.secret.exs"
else
defmodule Pleroma.Captcha.Kocaptcha do
import Pleroma.Web.Gettext
alias Pleroma.Captcha.Service
+
@behaviour Service
+ @default_endpoint "https://captcha.kotobank.ch"
@impl Service
def new do
- endpoint = Pleroma.Config.get!([__MODULE__, :endpoint])
+ endpoint = Pleroma.Config.get([__MODULE__, :endpoint], @default_endpoint)
case Tesla.get(endpoint <> "/new") do
{:error, _} ->