debian-mirror-gitlab/config/routes/snippets.rb

19 lines
491 B
Ruby
Raw Normal View History

2016-11-03 12:29:30 +05:30
resources :snippets, concerns: :awardable do
member do
2017-08-17 22:00:37 +05:30
get :raw
post :mark_as_spam
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
2016-11-03 12:29:30 +05:30
end
end
get '/s/:username', to: redirect('/u/%{username}/snippets'),
constraints: { username: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ }