Commit ea690378 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Improve routes for project badges

parent 77e178b5
......@@ -749,10 +749,11 @@ Rails.application.routes.draw do
end
resources :runner_projects, only: [:create, :destroy]
resources :badges, only: [], path: 'badges/*ref',
constraints: { ref: Gitlab::Regex.git_reference_regex } do
resources :badges, only: [] do
collection do
get :build, constraints: { format: /svg/ }
scope '*ref', constraints: { ref: Gitlab::Regex.git_reference_regex } do
get :build, constraints: { format: /svg/ }
end
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment