From 8d242f52d4bf44a012603fb2cc6fe4dd9b282ef8 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Mon, 16 Dec 2019 19:33:51 +0700 Subject: [PATCH] Revert "Add default endpoint to Pleroma.Captcha.Kocaptcha" This reverts commit 82c62c5028f517ded121b46b9806053989defdc2. --- config/test.exs | 2 ++ lib/pleroma/captcha/kocaptcha.ex | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/test.exs b/config/test.exs index d52ced612..b48b89c8f 100644 --- a/config/test.exs +++ b/config/test.exs @@ -95,6 +95,8 @@ 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 diff --git a/lib/pleroma/captcha/kocaptcha.ex b/lib/pleroma/captcha/kocaptcha.ex index a3128decb..4e1a07c59 100644 --- a/lib/pleroma/captcha/kocaptcha.ex +++ b/lib/pleroma/captcha/kocaptcha.ex @@ -5,13 +5,11 @@ 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], @default_endpoint) + endpoint = Pleroma.Config.get!([__MODULE__, :endpoint]) case Tesla.get(endpoint <> "/new") do {:error, _} ->