mirror of https://github.com/iv-org/invidious.git
routing: move watch/embed routes registration to Invidious::Routing
This commit is contained in:
parent
e2532de766
commit
906466d7fb
|
@ -333,23 +333,10 @@ end
|
||||||
Invidious::Routing.get "/", Invidious::Routes::Misc, :home
|
Invidious::Routing.get "/", Invidious::Routes::Misc, :home
|
||||||
Invidious::Routing.get "/privacy", Invidious::Routes::Misc, :privacy
|
Invidious::Routing.get "/privacy", Invidious::Routes::Misc, :privacy
|
||||||
Invidious::Routing.get "/licenses", Invidious::Routes::Misc, :licenses
|
Invidious::Routing.get "/licenses", Invidious::Routes::Misc, :licenses
|
||||||
|
|
||||||
Invidious::Routing.register_channel_routes
|
|
||||||
|
|
||||||
Invidious::Routing.get "/watch", Invidious::Routes::Watch, :handle
|
|
||||||
Invidious::Routing.post "/watch_ajax", Invidious::Routes::Watch, :mark_watched
|
|
||||||
Invidious::Routing.get "/watch/:id", Invidious::Routes::Watch, :redirect
|
|
||||||
Invidious::Routing.get "/shorts/:id", Invidious::Routes::Watch, :redirect
|
|
||||||
Invidious::Routing.get "/clip/:clip", Invidious::Routes::Watch, :clip
|
|
||||||
Invidious::Routing.get "/w/:id", Invidious::Routes::Watch, :redirect
|
|
||||||
Invidious::Routing.get "/v/:id", Invidious::Routes::Watch, :redirect
|
|
||||||
Invidious::Routing.get "/e/:id", Invidious::Routes::Watch, :redirect
|
|
||||||
Invidious::Routing.get "/redirect", Invidious::Routes::Misc, :cross_instance_redirect
|
Invidious::Routing.get "/redirect", Invidious::Routes::Misc, :cross_instance_redirect
|
||||||
|
|
||||||
Invidious::Routing.post "/download", Invidious::Routes::Watch, :download
|
Invidious::Routing.register_channel_routes
|
||||||
|
Invidious::Routing.register_watch_routes
|
||||||
Invidious::Routing.get "/embed/", Invidious::Routes::Embed, :redirect
|
|
||||||
Invidious::Routing.get "/embed/:id", Invidious::Routes::Embed, :show
|
|
||||||
|
|
||||||
Invidious::Routing.get "/create_playlist", Invidious::Routes::Playlists, :new
|
Invidious::Routing.get "/create_playlist", Invidious::Routes::Playlists, :new
|
||||||
Invidious::Routing.post "/create_playlist", Invidious::Routes::Playlists, :create
|
Invidious::Routing.post "/create_playlist", Invidious::Routes::Playlists, :create
|
||||||
|
|
|
@ -71,6 +71,22 @@ module Invidious::Routing
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def register_watch_routes
|
||||||
|
get "/watch", Routes::Watch, :handle
|
||||||
|
post "/watch_ajax", Routes::Watch, :mark_watched
|
||||||
|
get "/watch/:id", Routes::Watch, :redirect
|
||||||
|
get "/shorts/:id", Routes::Watch, :redirect
|
||||||
|
get "/clip/:clip", Routes::Watch, :clip
|
||||||
|
get "/w/:id", Routes::Watch, :redirect
|
||||||
|
get "/v/:id", Routes::Watch, :redirect
|
||||||
|
get "/e/:id", Routes::Watch, :redirect
|
||||||
|
|
||||||
|
post "/download", Routes::Watch, :download
|
||||||
|
|
||||||
|
get "/embed/", Routes::Embed, :redirect
|
||||||
|
get "/embed/:id", Routes::Embed, :show
|
||||||
|
end
|
||||||
|
|
||||||
def register_api_manifest_routes
|
def register_api_manifest_routes
|
||||||
get "/api/manifest/dash/id/:id", Routes::API::Manifest, :get_dash_video_id
|
get "/api/manifest/dash/id/:id", Routes::API::Manifest, :get_dash_video_id
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue