gitlab-org--gitlab-foss/config/routes/snippets.rb
Dmitriy Zaporozhets 9be95e2b2f
Remove deprecated /u/:username routes
Also release `u` from TOP_LEVEL_ROUTES

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-06-26 09:18:13 +03:00

21 lines
517 B
Ruby

resources :snippets, concerns: :awardable do
member do
get :raw
post :mark_as_spam
end
collection do
post :preview_markdown
end
scope module: :snippets do
resources :notes, only: [:index, :create, :destroy, :update], concerns: :awardable, constraints: { id: /\d+/ } do
member do
delete :delete_attachment
end
end
end
end
get '/s/:username', to: redirect('users/%{username}/snippets'),
constraints: { username: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ }