summaryrefslogtreecommitdiff
path: root/lib/api/v3/services.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-03-16 18:25:39 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-03-16 18:25:39 +0000
commitd5cb998e611805a7b18fa4b977825f70fa7dd7bb (patch)
tree1d589494f9a3d27f52cb0d275c069299f011f540 /lib/api/v3/services.rb
parentac8beca42399fd36b471c63ea1dfe8ad0e48ed8f (diff)
parent63360adeae3ba5b302b711c73b6439956d274cde (diff)
downloadgitlab-ce-d5cb998e611805a7b18fa4b977825f70fa7dd7bb.tar.gz
Merge branch '27988-fix-transient-failure-in-commits-api' into 'master'
Ensure dots in project and group ID are allowed in the API endpoints Closes #27988 See merge request !9944
Diffstat (limited to 'lib/api/v3/services.rb')
-rw-r--r--lib/api/v3/services.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/api/v3/services.rb b/lib/api/v3/services.rb
index d77185ffe5a..3bacaeee032 100644
--- a/lib/api/v3/services.rb
+++ b/lib/api/v3/services.rb
@@ -554,7 +554,10 @@ module API
]
}.freeze
- resource :projects do
+ params do
+ requires :id, type: String, desc: 'The ID of a project'
+ end
+ resource :projects, requirements: { id: %r{[^/]+} } do
before { authenticate! }
before { authorize_admin_project }
@@ -609,7 +612,7 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
end
- resource :projects do
+ resource :projects, requirements: { id: %r{[^/]+} } do
desc "Trigger a slash command for #{service_slug}" do
detail 'Added in GitLab 8.13'
end