diff options
author | Mark Felder <feld@FreeBSD.org> | 2020-07-29 16:07:22 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2020-07-29 16:07:22 -0500 |
commit | 33f042780909f3478597a8ecd10a2bf31e99dcc9 (patch) | |
tree | dd1bfc20ce035bd3ccf6c6472b1c540339745484 /lib/pleroma/captcha | |
parent | a6d3bb5f30697cafc5dd9acf490bde7e2f33f5f8 (diff) | |
download | pleroma-33f042780909f3478597a8ecd10a2bf31e99dcc9.tar.gz |
Expose seconds_valid in Pleroma Captcha API endpoint
Diffstat (limited to 'lib/pleroma/captcha')
-rw-r--r-- | lib/pleroma/captcha/kocaptcha.ex | 3 | ||||
-rw-r--r-- | lib/pleroma/captcha/native.ex | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/captcha/kocaptcha.ex b/lib/pleroma/captcha/kocaptcha.ex index 6bc2fa158..337506647 100644 --- a/lib/pleroma/captcha/kocaptcha.ex +++ b/lib/pleroma/captcha/kocaptcha.ex @@ -21,7 +21,8 @@ defmodule Pleroma.Captcha.Kocaptcha do type: :kocaptcha, token: json_resp["token"], url: endpoint <> json_resp["url"], - answer_data: json_resp["md5"] + answer_data: json_resp["md5"], + seconds_valid: Pleroma.Config.get([Pleroma.Captcha, :seconds_valid]) } end end diff --git a/lib/pleroma/captcha/native.ex b/lib/pleroma/captcha/native.ex index a90631d61..8d604d2b2 100644 --- a/lib/pleroma/captcha/native.ex +++ b/lib/pleroma/captcha/native.ex @@ -17,7 +17,8 @@ defmodule Pleroma.Captcha.Native do type: :native, token: token(), url: "data:image/png;base64," <> Base.encode64(img_binary), - answer_data: answer_data + answer_data: answer_data, + seconds_valid: Pleroma.Config.get([Pleroma.Captcha, :seconds_valid]) } end end |