mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-14 06:10:35 +05:30
routing: move image proxy routes registration to Invidious::Routing
This commit is contained in:
parent
3ac4390d11
commit
e2532de766
@ -393,12 +393,7 @@ end
|
|||||||
Invidious::Routing.get "/modify_notifications", Invidious::Routes::Notifications, :modify
|
Invidious::Routing.get "/modify_notifications", Invidious::Routes::Notifications, :modify
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
Invidious::Routing.get "/ggpht/*", Invidious::Routes::Images, :ggpht
|
Invidious::Routing.register_image_routes
|
||||||
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
|
|
||||||
|
|
||||||
# API routes (macro)
|
# API routes (macro)
|
||||||
Invidious::Routing.register_api_v1_routes
|
Invidious::Routing.register_api_v1_routes
|
||||||
|
@ -94,6 +94,15 @@ module Invidious::Routing
|
|||||||
get "/latest_version", Routes::VideoPlayback, :latest_version
|
get "/latest_version", Routes::VideoPlayback, :latest_version
|
||||||
end
|
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
|
# API routes
|
||||||
# -------------------
|
# -------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user