Update authentication.cr

This commit is contained in:
Ryan G 2023-06-13 00:02:50 -07:00
parent b2c0adbcdd
commit d7a1fc6d44

View File

@ -36,11 +36,7 @@ module Invidious::Routes::API::V1::Authentication
password = password.byte_slice(0, 55)
# send captcha if enabled
if CONFIG.captcha_enabled
captcha_response = nil
begin
captcha_response = CaptchaResponse.from_json(env.request.body || "{}")
rescue
end
captcha_response = CaptchaResponse.from_json(env.request.body || "{}")
if captcha_response
answer = captcha_response.answer
tokens = captcha_response.tokens