summaryrefslogtreecommitdiffstats
path: root/src/invidious.cr
diff options
context:
space:
mode:
authorsaltycrys <73420320+saltycrys@users.noreply.github.com>2021-02-02 06:18:16 +0100
committersaltycrys <73420320+saltycrys@users.noreply.github.com>2021-02-02 06:18:16 +0100
commit991a04dc2aeb08f497f004cfe82ec9b5a4be72e3 (patch)
tree812d7e5388f09c8c1f782d1400a0b334621e4498 /src/invidious.cr
parent82da5cfd0127aaa88fb72ac703a5c8bb80d5d6f7 (diff)
downloadinvidious-991a04dc2aeb08f497f004cfe82ec9b5a4be72e3.tar.gz
invidious-991a04dc2aeb08f497f004cfe82ec9b5a4be72e3.tar.bz2
invidious-991a04dc2aeb08f497f004cfe82ec9b5a4be72e3.zip
Adjust routes
Simple routes have been moved into a single `Misc` file. Embed routes have been moved into a single `Embed` file. The preferences route has been renamed to be more consistent with other parts of the codebase.
Diffstat (limited to 'src/invidious.cr')
-rw-r--r--src/invidious.cr16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index 713d193e..a63d6aca 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -311,12 +311,12 @@ before_all do |env|
env.set "current_page", URI.encode_www_form(current_page)
end
-Invidious::Routing.get "/", Invidious::Routes::Home
-Invidious::Routing.get "/privacy", Invidious::Routes::Privacy
-Invidious::Routing.get "/licenses", Invidious::Routes::Licenses
+Invidious::Routing.get "/", Invidious::Routes::Misc, :home
+Invidious::Routing.get "/privacy", Invidious::Routes::Misc, :privacy
+Invidious::Routing.get "/licenses", Invidious::Routes::Misc, :licenses
Invidious::Routing.get "/watch", Invidious::Routes::Watch
-Invidious::Routing.get "/embed/", Invidious::Routes::Embed::Index
-Invidious::Routing.get "/embed/:id", Invidious::Routes::Embed::Show
+Invidious::Routing.get "/embed/", Invidious::Routes::Embed, :redirect
+Invidious::Routing.get "/embed/:id", Invidious::Routes::Embed, :show
Invidious::Routing.get "/view_all_playlists", Invidious::Routes::Playlists, :index
Invidious::Routing.get "/create_playlist", Invidious::Routes::Playlists, :new
Invidious::Routing.post "/create_playlist", Invidious::Routes::Playlists, :create
@@ -335,9 +335,9 @@ Invidious::Routing.get "/search", Invidious::Routes::Search, :search
Invidious::Routing.get "/login", Invidious::Routes::Login, :login_page
Invidious::Routing.post "/login", Invidious::Routes::Login, :login
Invidious::Routing.post "/signout", Invidious::Routes::Login, :signout
-Invidious::Routing.get "/preferences", Invidious::Routes::UserPreferences, :show
-Invidious::Routing.post "/preferences", Invidious::Routes::UserPreferences, :update
-Invidious::Routing.get "/toggle_theme", Invidious::Routes::UserPreferences, :toggle_theme
+Invidious::Routing.get "/preferences", Invidious::Routes::PreferencesRoute, :show
+Invidious::Routing.post "/preferences", Invidious::Routes::PreferencesRoute, :update
+Invidious::Routing.get "/toggle_theme", Invidious::Routes::PreferencesRoute, :toggle_theme
# Users