diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-02-08 08:51:10 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-02-11 10:29:14 +0100 |
commit | 52352dccc377a2f9f89c1e749f21b9ebd986f7c3 (patch) | |
tree | 74e9d71d2e67afc9f5b3e51a65bb4119b89140a4 /config | |
parent | 442a49db2bc5e3f6cea827879fa4f5c532a5f6f1 (diff) | |
download | gitlab-ce-52352dccc377a2f9f89c1e749f21b9ebd986f7c3.tar.gz |
Move badge implementation to builds controller
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/config/routes.rb b/config/routes.rb index 6b710bc45ea..ea14ba38198 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -493,13 +493,6 @@ Rails.application.routes.draw do constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ }, as: :commits ) - - get( - '/status/*id/badge', - to: 'commit#badge', - constraints: { format: /png/ }, - as: :build_badge - ) end resource :avatar, only: [:show, :destroy] @@ -615,9 +608,11 @@ Rails.application.routes.draw do resource :variables, only: [:show, :update] resources :triggers, only: [:index, :create, :destroy] - resources :builds, only: [:index, :show] do + resources :builds, only: [:index, :show], constraints: { id: /\d+/ } do collection do post :cancel_all + get :badge, path: 'status/*ref/badge', + constraints: { ref: Gitlab::Regex.git_reference_regex, format: /svg/ } end member do |