Improve routes for project badges
This commit is contained in:
parent
77e178b5e1
commit
ea69037831
1 changed files with 4 additions and 3 deletions
|
@ -749,15 +749,16 @@ 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
|
||||
scope '*ref', constraints: { ref: Gitlab::Regex.git_reference_regex } do
|
||||
get :build, constraints: { format: /svg/ }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Get all keys of user
|
||||
get ':username.keys' => 'profiles/keys#get_keys' , constraints: { username: /.*/ }
|
||||
|
|
Loading…
Reference in a new issue