diff options
author | Rémy Coutable <remy@rymai.me> | 2016-09-21 15:22:28 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-09-21 15:22:28 +0000 |
commit | 24fed567876a679be660551afea7677f2ea57665 (patch) | |
tree | 0b6695468e1e1a069845e36200275bf3c2c839ff /config/routes.rb | |
parent | ab49c1a3a326ad44cc3481becf0cad9095205703 (diff) | |
parent | e41a3912daaeabe19dc434df8837c9e7d7da7842 (diff) | |
download | gitlab-ce-24fed567876a679be660551afea7677f2ea57665.tar.gz |
Merge branch 'and-you-get-awards' into 'master'
And Snippets get awards
## What does this MR do?
Makes snippets more awesome, by making them awardables
## Why was this MR needed?
Because Snippets were left behind.
## What are the relevant issue numbers?
Closes #17878
See merge request !4456
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/config/routes.rb b/config/routes.rb index c4eee59e7aa..4d6ec699cbd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -35,6 +35,10 @@ Rails.application.routes.draw do post :approve_access_request, on: :member end + concern :awardable do + post :toggle_award_emoji, on: :member + end + namespace :ci do # CI API Ci::API::API.logger Rails.logger @@ -98,7 +102,7 @@ Rails.application.routes.draw do # # Global snippets # - resources :snippets do + resources :snippets, concerns: :awardable do member do get 'raw' end @@ -110,7 +114,6 @@ Rails.application.routes.draw do # # Invites # - resources :invites, only: [:show], constraints: { id: /[A-Za-z0-9_-]+/ } do member do post :accept @@ -662,7 +665,7 @@ Rails.application.routes.draw do end end - resources :snippets, constraints: { id: /\d+/ } do + resources :snippets, concerns: :awardable, constraints: { id: /\d+/ } do member do get 'raw' end @@ -724,7 +727,7 @@ Rails.application.routes.draw do end end - resources :merge_requests, constraints: { id: /\d+/ } do + resources :merge_requests, concerns: :awardable, constraints: { id: /\d+/ } do member do get :commits get :diffs @@ -736,7 +739,6 @@ Rails.application.routes.draw do post :cancel_merge_when_build_succeeds get :ci_status post :toggle_subscription - post :toggle_award_emoji post :remove_wip get :diff_for_path post :resolve_conflicts @@ -840,10 +842,9 @@ Rails.application.routes.draw do end end - resources :issues, constraints: { id: /\d+/ } do + resources :issues, concerns: :awardable, constraints: { id: /\d+/ } do member do post :toggle_subscription - post :toggle_award_emoji post :mark_as_spam get :referenced_merge_requests get :related_branches @@ -871,9 +872,8 @@ Rails.application.routes.draw do resources :group_links, only: [:index, :create, :destroy], constraints: { id: /\d+/ } - resources :notes, only: [:index, :create, :destroy, :update], constraints: { id: /\d+/ } do + resources :notes, only: [:index, :create, :destroy, :update], concerns: :awardable, constraints: { id: /\d+/ } do member do - post :toggle_award_emoji delete :delete_attachment post :resolve delete :resolve, action: :unresolve |