Move user captcha code to its own module

This commit is contained in:
Samantaz Fox
2022-02-04 03:44:10 +01:00
parent c04f45d5e3
commit ad4a06fca5
4 changed files with 87 additions and 79 deletions

View File

@@ -393,9 +393,9 @@ module Invidious::Routes::Login
prompt = ""
if captcha_type == "image"
captcha = generate_captcha(HMAC_KEY)
captcha = Invidious::User::Captcha.generate_image(HMAC_KEY)
else
captcha = generate_text_captcha(HMAC_KEY)
captcha = Invidious::User::Captcha.generate_text(HMAC_KEY)
end
return templated "login"