mirror of https://github.com/mastodon/mastodon
Update confirm_captcha check to use either method
Updated confirm_captcha check to use either method available depending on whether it is mCaptcha or hCaptcha enabled. Currently doesn't work since we need to change it to be compatible with an if/elsif statement. Adding it now so that we don't forget update it during cleanup/changes related to feedback from testing.
This commit is contained in:
parent
22340a8035
commit
f995efb501
|
@ -29,10 +29,16 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
|
||||||
end
|
end
|
||||||
|
|
||||||
def confirm_captcha
|
def confirm_captcha
|
||||||
check_captcha! do |message|
|
if Rails.configuration.x.captcha.mcaptcha_secret_key.present?
|
||||||
flash.now[:alert] = message
|
check_mcaptcha! do |message|
|
||||||
render :captcha
|
flash.now[:alert] = message
|
||||||
return
|
render :captcha
|
||||||
|
return
|
||||||
|
else
|
||||||
|
check_mcaptcha! do |message|
|
||||||
|
flash.now[:alert] = message
|
||||||
|
render :captcha
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
show
|
show
|
||||||
|
|
Loading…
Reference in New Issue