Move user pages (ECR files) to subfolder

This commit is contained in:
Samantaz Fox 2022-02-06 21:51:02 +01:00
parent 71a8867a4a
commit 99d770be64
No known key found for this signature in database
GPG Key ID: F42821059186176E
14 changed files with 14 additions and 14 deletions

View File

@ -23,7 +23,7 @@ module Invidious::Routes::Account
sid = sid.as(String) sid = sid.as(String)
csrf_token = generate_response(sid, {":change_password"}, HMAC_KEY) csrf_token = generate_response(sid, {":change_password"}, HMAC_KEY)
templated "change_password" templated "user/change_password"
end end
# Handle the password change (POST request) # Handle the password change (POST request)
@ -103,7 +103,7 @@ module Invidious::Routes::Account
sid = sid.as(String) sid = sid.as(String)
csrf_token = generate_response(sid, {":delete_account"}, HMAC_KEY) csrf_token = generate_response(sid, {":delete_account"}, HMAC_KEY)
templated "delete_account" templated "user/delete_account"
end end
# Handle the account deletion (POST request) # Handle the account deletion (POST request)
@ -161,7 +161,7 @@ module Invidious::Routes::Account
sid = sid.as(String) sid = sid.as(String)
csrf_token = generate_response(sid, {":clear_watch_history"}, HMAC_KEY) csrf_token = generate_response(sid, {":clear_watch_history"}, HMAC_KEY)
templated "clear_watch_history" templated "user/clear_watch_history"
end end
# Handle the watch history clearing (POST request) # Handle the watch history clearing (POST request)
@ -220,7 +220,7 @@ module Invidious::Routes::Account
expire = env.params.query["expire"]?.try &.to_i? expire = env.params.query["expire"]?.try &.to_i?
templated "authorize_token" templated "user/authorize_token"
end end
# Handle token authorization (POST request) # Handle token authorization (POST request)
@ -268,7 +268,7 @@ module Invidious::Routes::Account
else else
csrf_token = "" csrf_token = ""
env.set "access_token", access_token env.set "access_token", access_token
templated "authorize_token" templated "user/authorize_token"
end end
end end
@ -291,7 +291,7 @@ module Invidious::Routes::Account
user = user.as(User) user = user.as(User)
tokens = Invidious::Database::SessionIDs.select_all(user.email) tokens = Invidious::Database::SessionIDs.select_all(user.email)
templated "token_manager" templated "user/token_manager"
end end
# ------------------- # -------------------

View File

@ -343,7 +343,7 @@ module Invidious::Routes::API::V1::Authenticated
env.response.content_type = "text/html" env.response.content_type = "text/html"
csrf_token = generate_response(sid, {":authorize_token"}, HMAC_KEY, use_nonce: true) csrf_token = generate_response(sid, {":authorize_token"}, HMAC_KEY, use_nonce: true)
return templated "authorize_token" return templated "user/authorize_token"
else else
env.response.content_type = "application/json" env.response.content_type = "application/json"

View File

@ -27,7 +27,7 @@ module Invidious::Routes::Login
tfa = env.params.query["tfa"]? tfa = env.params.query["tfa"]?
prompt = nil prompt = nil
templated "login" templated "user/login"
end end
def self.login(env) def self.login(env)
@ -133,7 +133,7 @@ module Invidious::Routes::Login
tfa = tfa_code tfa = tfa_code
captcha = {tokens: [token], question: ""} captcha = {tokens: [token], question: ""}
return templated "login" return templated "user/login"
end end
if challenge_results[0][-1]?.try &.[5] == "INCORRECT_ANSWER_ENTERED" if challenge_results[0][-1]?.try &.[5] == "INCORRECT_ANSWER_ENTERED"
@ -190,7 +190,7 @@ module Invidious::Routes::Login
tfa = nil tfa = nil
captcha = nil captcha = nil
return templated "login" return templated "user/login"
end end
tl = challenge_results[1][2] tl = challenge_results[1][2]
@ -376,7 +376,7 @@ module Invidious::Routes::Login
captcha = Invidious::User::Captcha.generate_text(HMAC_KEY) captcha = Invidious::User::Captcha.generate_text(HMAC_KEY)
end end
return templated "login" return templated "user/login"
end end
tokens = env.params.body.select { |k, _| k.match(/^token\[\d+\]$/) }.map { |_, v| v } tokens = env.params.body.select { |k, _| k.match(/^token\[\d+\]$/) }.map { |_, v| v }

View File

@ -8,7 +8,7 @@ module Invidious::Routes::PreferencesRoute
preferences = env.get("preferences").as(Preferences) preferences = env.get("preferences").as(Preferences)
templated "preferences" templated "user/preferences"
end end
def self.update(env) def self.update(env)
@ -272,7 +272,7 @@ module Invidious::Routes::PreferencesRoute
user = user.as(User) user = user.as(User)
templated "data_control" templated "user/data_control"
end end
def self.update_data_control(env) def self.update_data_control(env)

View File

@ -163,6 +163,6 @@ module Invidious::Routes::Subscriptions
end end
end end
templated "subscription_manager" templated "user/subscription_manager"
end end
end end