Verified Commit 82c62c50 authored by minibikini's avatar minibikini

Add default endpoint to Pleroma.Captcha.Kocaptcha

parent 8efacfed
......@@ -95,8 +95,6 @@
config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: ""
if File.exists?("./config/test.secret.exs") do
import_config "test.secret.exs"
......@@ -5,11 +5,13 @@
defmodule Pleroma.Captcha.Kocaptcha do
import Pleroma.Web.Gettext
alias Pleroma.Captcha.Service
@behaviour Service
@default_endpoint ""
@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, _} ->
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment