mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-26 04:55:07 +01:00
Use with_options
for shared option in accounts#show
routing block (#28914)
This commit is contained in:
parent
30483d618f
commit
049d9171eb
@ -142,10 +142,12 @@ Rails.application.routes.draw do
|
|||||||
get '/:encoded_at(*path)', to: redirect("/@%{path}"), constraints: { encoded_at: /%40/ }
|
get '/:encoded_at(*path)', to: redirect("/@%{path}"), constraints: { encoded_at: /%40/ }
|
||||||
|
|
||||||
constraints(username: %r{[^@/.]+}) do
|
constraints(username: %r{[^@/.]+}) do
|
||||||
get '/@:username', to: 'accounts#show', as: :short_account
|
with_options to: 'accounts#show' do
|
||||||
get '/@:username/with_replies', to: 'accounts#show', as: :short_account_with_replies
|
get '/@:username', as: :short_account
|
||||||
get '/@:username/media', to: 'accounts#show', as: :short_account_media
|
get '/@:username/with_replies', as: :short_account_with_replies
|
||||||
get '/@:username/tagged/:tag', to: 'accounts#show', as: :short_account_tag
|
get '/@:username/media', as: :short_account_media
|
||||||
|
get '/@:username/tagged/:tag', as: :short_account_tag
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
constraints(account_username: %r{[^@/.]+}) do
|
constraints(account_username: %r{[^@/.]+}) do
|
||||||
|
Loading…
Reference in New Issue
Block a user