mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-29 07:58:35 +00:00
Remove residual account_type logic
This commit is contained in:
parent
3b77a2eac1
commit
2d289b3d12
@ -30,11 +30,6 @@ module Invidious::Routes::Login
|
|||||||
email = env.params.body["email"]?.try &.downcase.byte_slice(0, 254)
|
email = env.params.body["email"]?.try &.downcase.byte_slice(0, 254)
|
||||||
password = env.params.body["password"]?
|
password = env.params.body["password"]?
|
||||||
|
|
||||||
account_type = env.params.query["type"]?
|
|
||||||
account_type ||= "invidious"
|
|
||||||
|
|
||||||
case account_type
|
|
||||||
when "invidious"
|
|
||||||
if email.nil? || email.empty?
|
if email.nil? || email.empty?
|
||||||
return error_template(401, "User ID is a required field")
|
return error_template(401, "User ID is a required field")
|
||||||
end
|
end
|
||||||
@ -66,9 +61,6 @@ module Invidious::Routes::Login
|
|||||||
end
|
end
|
||||||
|
|
||||||
env.redirect referer
|
env.redirect referer
|
||||||
else
|
|
||||||
env.redirect referer
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.signup_page(env)
|
def self.signup_page(env)
|
||||||
@ -88,9 +80,6 @@ module Invidious::Routes::Login
|
|||||||
password = nil
|
password = nil
|
||||||
captcha = nil
|
captcha = nil
|
||||||
|
|
||||||
account_type = env.params.query["type"]?
|
|
||||||
account_type ||= "invidious"
|
|
||||||
|
|
||||||
captcha_type = env.params.query["captcha"]?
|
captcha_type = env.params.query["captcha"]?
|
||||||
captcha_type ||= "image"
|
captcha_type ||= "image"
|
||||||
|
|
||||||
|
@ -81,8 +81,6 @@ struct Invidious::User
|
|||||||
end
|
end
|
||||||
captcha_type ||= "image"
|
captcha_type ||= "image"
|
||||||
|
|
||||||
account_type = "invidious"
|
|
||||||
|
|
||||||
if captcha_type == "image"
|
if captcha_type == "image"
|
||||||
captcha = Invidious::User::Captcha.generate_image(HMAC_KEY)
|
captcha = Invidious::User::Captcha.generate_image(HMAC_KEY)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user