mirror of
https://github.com/iv-org/invidious.git
synced 2024-10-01 01:25:56 -04:00
Move user pages (ECR files) to subfolder
This commit is contained in:
parent
71a8867a4a
commit
99d770be64
@ -23,7 +23,7 @@ module Invidious::Routes::Account
|
||||
sid = sid.as(String)
|
||||
csrf_token = generate_response(sid, {":change_password"}, HMAC_KEY)
|
||||
|
||||
templated "change_password"
|
||||
templated "user/change_password"
|
||||
end
|
||||
|
||||
# Handle the password change (POST request)
|
||||
@ -103,7 +103,7 @@ module Invidious::Routes::Account
|
||||
sid = sid.as(String)
|
||||
csrf_token = generate_response(sid, {":delete_account"}, HMAC_KEY)
|
||||
|
||||
templated "delete_account"
|
||||
templated "user/delete_account"
|
||||
end
|
||||
|
||||
# Handle the account deletion (POST request)
|
||||
@ -161,7 +161,7 @@ module Invidious::Routes::Account
|
||||
sid = sid.as(String)
|
||||
csrf_token = generate_response(sid, {":clear_watch_history"}, HMAC_KEY)
|
||||
|
||||
templated "clear_watch_history"
|
||||
templated "user/clear_watch_history"
|
||||
end
|
||||
|
||||
# Handle the watch history clearing (POST request)
|
||||
@ -220,7 +220,7 @@ module Invidious::Routes::Account
|
||||
|
||||
expire = env.params.query["expire"]?.try &.to_i?
|
||||
|
||||
templated "authorize_token"
|
||||
templated "user/authorize_token"
|
||||
end
|
||||
|
||||
# Handle token authorization (POST request)
|
||||
@ -268,7 +268,7 @@ module Invidious::Routes::Account
|
||||
else
|
||||
csrf_token = ""
|
||||
env.set "access_token", access_token
|
||||
templated "authorize_token"
|
||||
templated "user/authorize_token"
|
||||
end
|
||||
end
|
||||
|
||||
@ -291,7 +291,7 @@ module Invidious::Routes::Account
|
||||
user = user.as(User)
|
||||
tokens = Invidious::Database::SessionIDs.select_all(user.email)
|
||||
|
||||
templated "token_manager"
|
||||
templated "user/token_manager"
|
||||
end
|
||||
|
||||
# -------------------
|
||||
|
@ -343,7 +343,7 @@ module Invidious::Routes::API::V1::Authenticated
|
||||
env.response.content_type = "text/html"
|
||||
|
||||
csrf_token = generate_response(sid, {":authorize_token"}, HMAC_KEY, use_nonce: true)
|
||||
return templated "authorize_token"
|
||||
return templated "user/authorize_token"
|
||||
else
|
||||
env.response.content_type = "application/json"
|
||||
|
||||
|
@ -27,7 +27,7 @@ module Invidious::Routes::Login
|
||||
tfa = env.params.query["tfa"]?
|
||||
prompt = nil
|
||||
|
||||
templated "login"
|
||||
templated "user/login"
|
||||
end
|
||||
|
||||
def self.login(env)
|
||||
@ -133,7 +133,7 @@ module Invidious::Routes::Login
|
||||
tfa = tfa_code
|
||||
captcha = {tokens: [token], question: ""}
|
||||
|
||||
return templated "login"
|
||||
return templated "user/login"
|
||||
end
|
||||
|
||||
if challenge_results[0][-1]?.try &.[5] == "INCORRECT_ANSWER_ENTERED"
|
||||
@ -190,7 +190,7 @@ module Invidious::Routes::Login
|
||||
|
||||
tfa = nil
|
||||
captcha = nil
|
||||
return templated "login"
|
||||
return templated "user/login"
|
||||
end
|
||||
|
||||
tl = challenge_results[1][2]
|
||||
@ -376,7 +376,7 @@ module Invidious::Routes::Login
|
||||
captcha = Invidious::User::Captcha.generate_text(HMAC_KEY)
|
||||
end
|
||||
|
||||
return templated "login"
|
||||
return templated "user/login"
|
||||
end
|
||||
|
||||
tokens = env.params.body.select { |k, _| k.match(/^token\[\d+\]$/) }.map { |_, v| v }
|
||||
|
@ -8,7 +8,7 @@ module Invidious::Routes::PreferencesRoute
|
||||
|
||||
preferences = env.get("preferences").as(Preferences)
|
||||
|
||||
templated "preferences"
|
||||
templated "user/preferences"
|
||||
end
|
||||
|
||||
def self.update(env)
|
||||
@ -272,7 +272,7 @@ module Invidious::Routes::PreferencesRoute
|
||||
|
||||
user = user.as(User)
|
||||
|
||||
templated "data_control"
|
||||
templated "user/data_control"
|
||||
end
|
||||
|
||||
def self.update_data_control(env)
|
||||
|
@ -163,6 +163,6 @@ module Invidious::Routes::Subscriptions
|
||||
end
|
||||
end
|
||||
|
||||
templated "subscription_manager"
|
||||
templated "user/subscription_manager"
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user