summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2022-02-06 21:51:02 +0100
committerSamantaz Fox <coding@samantaz.fr>2022-02-07 17:39:15 +0100
commit99d770be643d36fe40fbb8ac54a5fa5f692aebf0 (patch)
tree47af3c60b23a9c659682fc31c51e478cfe2cdf3c /src
parent71a8867a4a719023230802f2927617d676bfa0b4 (diff)
downloadinvidious-99d770be643d36fe40fbb8ac54a5fa5f692aebf0.tar.gz
invidious-99d770be643d36fe40fbb8ac54a5fa5f692aebf0.tar.bz2
invidious-99d770be643d36fe40fbb8ac54a5fa5f692aebf0.zip
Move user pages (ECR files) to subfolder
Diffstat (limited to 'src')
-rw-r--r--src/invidious/routes/account.cr12
-rw-r--r--src/invidious/routes/api/v1/authenticated.cr2
-rw-r--r--src/invidious/routes/login.cr8
-rw-r--r--src/invidious/routes/preferences.cr4
-rw-r--r--src/invidious/routes/subscriptions.cr2
-rw-r--r--src/invidious/views/user/authorize_token.ecr (renamed from src/invidious/views/authorize_token.ecr)0
-rw-r--r--src/invidious/views/user/change_password.ecr (renamed from src/invidious/views/change_password.ecr)0
-rw-r--r--src/invidious/views/user/clear_watch_history.ecr (renamed from src/invidious/views/clear_watch_history.ecr)0
-rw-r--r--src/invidious/views/user/data_control.ecr (renamed from src/invidious/views/data_control.ecr)0
-rw-r--r--src/invidious/views/user/delete_account.ecr (renamed from src/invidious/views/delete_account.ecr)0
-rw-r--r--src/invidious/views/user/login.ecr (renamed from src/invidious/views/login.ecr)0
-rw-r--r--src/invidious/views/user/preferences.ecr (renamed from src/invidious/views/preferences.ecr)0
-rw-r--r--src/invidious/views/user/subscription_manager.ecr (renamed from src/invidious/views/subscription_manager.ecr)0
-rw-r--r--src/invidious/views/user/token_manager.ecr (renamed from src/invidious/views/token_manager.ecr)0
14 files changed, 14 insertions, 14 deletions
diff --git a/src/invidious/routes/account.cr b/src/invidious/routes/account.cr
index 2be0de37..9bb73136 100644
--- a/src/invidious/routes/account.cr
+++ b/src/invidious/routes/account.cr
@@ -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
# -------------------
diff --git a/src/invidious/routes/api/v1/authenticated.cr b/src/invidious/routes/api/v1/authenticated.cr
index 4e9fc801..c27853ca 100644
--- a/src/invidious/routes/api/v1/authenticated.cr
+++ b/src/invidious/routes/api/v1/authenticated.cr
@@ -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"
diff --git a/src/invidious/routes/login.cr b/src/invidious/routes/login.cr
index 8767ec22..65b337d1 100644
--- a/src/invidious/routes/login.cr
+++ b/src/invidious/routes/login.cr
@@ -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 }
diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr
index 294932eb..68d61fd1 100644
--- a/src/invidious/routes/preferences.cr
+++ b/src/invidious/routes/preferences.cr
@@ -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)
diff --git a/src/invidious/routes/subscriptions.cr b/src/invidious/routes/subscriptions.cr
index ec8fe67b..7b1fa876 100644
--- a/src/invidious/routes/subscriptions.cr
+++ b/src/invidious/routes/subscriptions.cr
@@ -163,6 +163,6 @@ module Invidious::Routes::Subscriptions
end
end
- templated "subscription_manager"
+ templated "user/subscription_manager"
end
end
diff --git a/src/invidious/views/authorize_token.ecr b/src/invidious/views/user/authorize_token.ecr
index 725f392e..725f392e 100644
--- a/src/invidious/views/authorize_token.ecr
+++ b/src/invidious/views/user/authorize_token.ecr
diff --git a/src/invidious/views/change_password.ecr b/src/invidious/views/user/change_password.ecr
index 1b9eb82e..1b9eb82e 100644
--- a/src/invidious/views/change_password.ecr
+++ b/src/invidious/views/user/change_password.ecr
diff --git a/src/invidious/views/clear_watch_history.ecr b/src/invidious/views/user/clear_watch_history.ecr
index c9acbe44..c9acbe44 100644
--- a/src/invidious/views/clear_watch_history.ecr
+++ b/src/invidious/views/user/clear_watch_history.ecr
diff --git a/src/invidious/views/data_control.ecr b/src/invidious/views/user/data_control.ecr
index 74ccc06c..74ccc06c 100644
--- a/src/invidious/views/data_control.ecr
+++ b/src/invidious/views/user/data_control.ecr
diff --git a/src/invidious/views/delete_account.ecr b/src/invidious/views/user/delete_account.ecr
index 67351bbf..67351bbf 100644
--- a/src/invidious/views/delete_account.ecr
+++ b/src/invidious/views/user/delete_account.ecr
diff --git a/src/invidious/views/login.ecr b/src/invidious/views/user/login.ecr
index 01d7a210..01d7a210 100644
--- a/src/invidious/views/login.ecr
+++ b/src/invidious/views/user/login.ecr
diff --git a/src/invidious/views/preferences.ecr b/src/invidious/views/user/preferences.ecr
index 3606d140..3606d140 100644
--- a/src/invidious/views/preferences.ecr
+++ b/src/invidious/views/user/preferences.ecr
diff --git a/src/invidious/views/subscription_manager.ecr b/src/invidious/views/user/subscription_manager.ecr
index c2a89ca2..c2a89ca2 100644
--- a/src/invidious/views/subscription_manager.ecr
+++ b/src/invidious/views/user/subscription_manager.ecr
diff --git a/src/invidious/views/token_manager.ecr b/src/invidious/views/user/token_manager.ecr
index 79f905a1..79f905a1 100644
--- a/src/invidious/views/token_manager.ecr
+++ b/src/invidious/views/user/token_manager.ecr