kopia lustrzana https://github.com/iv-org/invidious
routing: move image proxy routes registration to Invidious::Routing
rodzic
3ac4390d11
commit
e2532de766
|
@ -393,12 +393,7 @@ end
|
|||
Invidious::Routing.get "/modify_notifications", Invidious::Routes::Notifications, :modify
|
||||
{% end %}
|
||||
|
||||
Invidious::Routing.get "/ggpht/*", Invidious::Routes::Images, :ggpht
|
||||
Invidious::Routing.options "/sb/:authority/:id/:storyboard/:index", Invidious::Routes::Images, :options_storyboard
|
||||
Invidious::Routing.get "/sb/:authority/:id/:storyboard/:index", Invidious::Routes::Images, :get_storyboard
|
||||
Invidious::Routing.get "/s_p/:id/:name", Invidious::Routes::Images, :s_p_image
|
||||
Invidious::Routing.get "/yts/img/:name", Invidious::Routes::Images, :yts_image
|
||||
Invidious::Routing.get "/vi/:id/:name", Invidious::Routes::Images, :thumbnails
|
||||
Invidious::Routing.register_image_routes
|
||||
|
||||
# API routes (macro)
|
||||
Invidious::Routing.register_api_v1_routes
|
||||
|
|
|
@ -94,6 +94,15 @@ module Invidious::Routing
|
|||
get "/latest_version", Routes::VideoPlayback, :latest_version
|
||||
end
|
||||
|
||||
def register_image_routes
|
||||
get "/ggpht/*", Routes::Images, :ggpht
|
||||
options "/sb/:authority/:id/:storyboard/:index", Routes::Images, :options_storyboard
|
||||
get "/sb/:authority/:id/:storyboard/:index", Routes::Images, :get_storyboard
|
||||
get "/s_p/:id/:name", Routes::Images, :s_p_image
|
||||
get "/yts/img/:name", Routes::Images, :yts_image
|
||||
get "/vi/:id/:name", Routes::Images, :thumbnails
|
||||
end
|
||||
|
||||
# -------------------
|
||||
# API routes
|
||||
# -------------------
|
||||
|
|
Ładowanie…
Reference in New Issue