Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
86e7ae82
Commit
86e7ae82
authored
Sep 19, 2016
by
Z.J. van de Weg
Committed by
Fatih Acet
Sep 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use routing concerns to DRY the routes
parent
e8dd0d54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
config/routes.rb
config/routes.rb
+9
-9
No files found.
config/routes.rb
View file @
86e7ae82
...
...
@@ -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,10 +102,9 @@ Rails.application.routes.draw do
#
# Global snippets
#
resources
:snippets
do
resources
:snippets
,
concerns: :awardable
do
member
do
get
'raw'
post
:toggle_award_emoji
end
end
...
...
@@ -662,7 +665,7 @@ Rails.application.routes.draw do
end
end
resources
:snippets
,
constraints:
{
id:
/\d+/
}
do
resources
:snippets
,
con
cerns: :awardable
,
con
straints:
{
id:
/\d+/
}
do
member
do
get
'raw'
post
:toggle_award_emoji
...
...
@@ -725,7 +728,7 @@ Rails.application.routes.draw do
end
end
resources
:merge_requests
,
constraints:
{
id:
/\d+/
}
do
resources
:merge_requests
,
con
cerns: :awardable
,
con
straints:
{
id:
/\d+/
}
do
member
do
get
:commits
get
:diffs
...
...
@@ -737,7 +740,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
...
...
@@ -839,10 +841,9 @@ Rails.application.routes.draw do
end
end
resources
:issues
,
constraints:
{
id:
/\d+/
}
do
resources
:issues
,
con
cerns: :awardable
,
con
straints:
{
id:
/\d+/
}
do
member
do
post
:toggle_subscription
post
:toggle_award_emoji
post
:mark_as_spam
get
:referenced_merge_requests
get
:related_branches
...
...
@@ -870,9 +871,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
],
con
cerns: :awardable
,
con
straints:
{
id:
/\d+/
}
do
member
do
post
:toggle_award_emoji
delete
:delete_attachment
post
:resolve
delete
:resolve
,
action: :unresolve
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment