fx /screenshot-with-version
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
Christoph Haas 2025-06-27 00:06:31 +02:00
parent c0b25fee99
commit c09fcea025

View file

@ -62,11 +62,11 @@ Rails.application.routes.draw do
# Return small image for a specific package # Return small image for a specific package
# TODO: needed at all? # TODO: needed at all?
get 'small/:name' => 'packages#send_image', as: :small_image, name: %r{[^/]+}, # get 'small/:name' => 'packages#send_image', as: :small_image, name: %r{[^/]+},
defaults: { size: :small } # defaults: { size: :small }
# Return small image by specific screenshot_id # # Return small image by specific screenshot_id
get 'small/:name/:screenshot_id' => 'packages#send_image', as: :small_image_with_id, name: %r{[^/]+}, # get 'small/:name/:screenshot_id' => 'packages#send_image', as: :small_image_with_id, name: %r{[^/]+},
defaults: { size: :small } # defaults: { size: :small }
# Return large image for a specific package # Return large image for a specific package
get 'screenshot/:name' => 'packages#send_image', as: :screenshot_image, name: %r{[^/]+}, get 'screenshot/:name' => 'packages#send_image', as: :screenshot_image, name: %r{[^/]+},
@ -76,7 +76,7 @@ Rails.application.routes.draw do
defaults: { size: :large } defaults: { size: :large }
get 'screenshot-404/:name' => 'packages#send_image', name: %r{[^/]+} get 'screenshot-404/:name' => 'packages#send_image', name: %r{[^/]+}
get 'screenshot-with-version/:name/:version' => 'packages#send_image', name: %r{[^/]+}, get 'screenshot-with-version/:name/:version' => 'packages#send_image', name: %r{[^/]+},
version: /\d.*/ version: /\d.*/, defaults: { size: :large }
# Legacy URLs # Legacy URLs
get 'with_screenshots', to: redirect('/packages?show=with') get 'with_screenshots', to: redirect('/packages?show=with')