1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-17 18:49:15 +00:00

Add default endpoint to Pleroma.Captcha.Kocaptcha

This commit is contained in:
Egor Kislitsyn 2019-12-16 15:32:33 +07:00
parent 8efacfed67
commit 82c62c5028
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
2 changed files with 3 additions and 3 deletions

View file

@ -95,8 +95,6 @@
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

View file

@ -5,11 +5,13 @@
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, _} ->