mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-29 07:58:35 +00:00
Update authentication.cr
This commit is contained in:
parent
de238ebc48
commit
c39bc80d98
@ -10,7 +10,7 @@ module Invidious::Routes::API::V1::Authentication
|
|||||||
creds = nil
|
creds = nil
|
||||||
begin
|
begin
|
||||||
creds = Credentials.from_json(body_json)
|
creds = Credentials.from_json(body_json)
|
||||||
rescue
|
rescue JSON::SerializableError
|
||||||
end
|
end
|
||||||
# get user info
|
# get user info
|
||||||
if creds
|
if creds
|
||||||
@ -42,11 +42,10 @@ module Invidious::Routes::API::V1::Authentication
|
|||||||
# send captcha if enabled
|
# send captcha if enabled
|
||||||
if CONFIG.captcha_enabled
|
if CONFIG.captcha_enabled
|
||||||
captcha_response = nil
|
captcha_response = nil
|
||||||
|
begin
|
||||||
captcha_response = CaptchaResponse.from_json(body_json)
|
captcha_response = CaptchaResponse.from_json(body_json)
|
||||||
# begin
|
rescue JSON::SerializableError
|
||||||
# rescue ex
|
end
|
||||||
|
|
||||||
# end
|
|
||||||
if captcha_response
|
if captcha_response
|
||||||
answer = captcha_response.answer
|
answer = captcha_response.answer
|
||||||
tokens = captcha_response.tokens
|
tokens = captcha_response.tokens
|
||||||
|
Loading…
Reference in New Issue
Block a user