mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-23 05:53:37 +00:00
routing: move playlist routes registration to Invidious::Routing
This commit is contained in:
parent
906466d7fb
commit
5503914abe
@ -338,18 +338,8 @@ end
|
||||
Invidious::Routing.register_channel_routes
|
||||
Invidious::Routing.register_watch_routes
|
||||
|
||||
Invidious::Routing.get "/create_playlist", Invidious::Routes::Playlists, :new
|
||||
Invidious::Routing.post "/create_playlist", Invidious::Routes::Playlists, :create
|
||||
Invidious::Routing.get "/subscribe_playlist", Invidious::Routes::Playlists, :subscribe
|
||||
Invidious::Routing.get "/delete_playlist", Invidious::Routes::Playlists, :delete_page
|
||||
Invidious::Routing.post "/delete_playlist", Invidious::Routes::Playlists, :delete
|
||||
Invidious::Routing.get "/edit_playlist", Invidious::Routes::Playlists, :edit
|
||||
Invidious::Routing.post "/edit_playlist", Invidious::Routes::Playlists, :update
|
||||
Invidious::Routing.get "/add_playlist_items", Invidious::Routes::Playlists, :add_playlist_items_page
|
||||
Invidious::Routing.post "/playlist_ajax", Invidious::Routes::Playlists, :playlist_ajax
|
||||
Invidious::Routing.get "/playlist", Invidious::Routes::Playlists, :show
|
||||
Invidious::Routing.get "/mix", Invidious::Routes::Playlists, :mix
|
||||
Invidious::Routing.get "/watch_videos", Invidious::Routes::Playlists, :watch_videos
|
||||
Invidious::Routing.register_iv_playlist_routes
|
||||
Invidious::Routing.register_yt_playlist_routes
|
||||
|
||||
Invidious::Routing.get "/opensearch.xml", Invidious::Routes::Search, :opensearch
|
||||
Invidious::Routing.get "/results", Invidious::Routes::Search, :results
|
||||
|
@ -44,6 +44,18 @@ module Invidious::Routing
|
||||
get "/subscription_manager", Routes::Subscriptions, :subscription_manager
|
||||
end
|
||||
|
||||
def register_iv_playlist_routes
|
||||
get "/create_playlist", Routes::Playlists, :new
|
||||
post "/create_playlist", Routes::Playlists, :create
|
||||
get "/subscribe_playlist", Routes::Playlists, :subscribe
|
||||
get "/delete_playlist", Routes::Playlists, :delete_page
|
||||
post "/delete_playlist", Routes::Playlists, :delete
|
||||
get "/edit_playlist", Routes::Playlists, :edit
|
||||
post "/edit_playlist", Routes::Playlists, :update
|
||||
get "/add_playlist_items", Routes::Playlists, :add_playlist_items_page
|
||||
post "/playlist_ajax", Routes::Playlists, :playlist_ajax
|
||||
end
|
||||
|
||||
# -------------------
|
||||
# Youtube routes
|
||||
# -------------------
|
||||
@ -87,6 +99,12 @@ module Invidious::Routing
|
||||
get "/embed/:id", Routes::Embed, :show
|
||||
end
|
||||
|
||||
def register_yt_playlist_routes
|
||||
get "/playlist", Routes::Playlists, :show
|
||||
get "/mix", Routes::Playlists, :mix
|
||||
get "/watch_videos", Routes::Playlists, :watch_videos
|
||||
end
|
||||
|
||||
def register_api_manifest_routes
|
||||
get "/api/manifest/dash/id/:id", Routes::API::Manifest, :get_dash_video_id
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user