Remove residual account_type logic

This commit is contained in:
syeopite 2023-07-26 15:57:43 -07:00
parent 3b77a2eac1
commit 2d289b3d12
No known key found for this signature in database
GPG Key ID: A73C186DA3955A1A
2 changed files with 21 additions and 34 deletions

View File

@ -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"

View File

@ -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