Commit ea690378 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Improve routes for project badges

parent 77e178b5
...@@ -749,15 +749,16 @@ Rails.application.routes.draw do ...@@ -749,15 +749,16 @@ Rails.application.routes.draw do
end end
resources :runner_projects, only: [:create, :destroy] resources :runner_projects, only: [:create, :destroy]
resources :badges, only: [], path: 'badges/*ref', resources :badges, only: [] do
constraints: { ref: Gitlab::Regex.git_reference_regex } do
collection do collection do
scope '*ref', constraints: { ref: Gitlab::Regex.git_reference_regex } do
get :build, constraints: { format: /svg/ } get :build, constraints: { format: /svg/ }
end end
end end
end end
end end
end end
end
# Get all keys of user # Get all keys of user
get ':username.keys' => 'profiles/keys#get_keys' , constraints: { username: /.*/ } get ':username.keys' => 'profiles/keys#get_keys' , constraints: { username: /.*/ }
......
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