summaryrefslogtreecommitdiff
path: root/lib/api/notes.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-03-15 19:09:24 +0100
committerRémy Coutable <remy@rymai.me>2017-03-16 18:00:24 +0100
commit63360adeae3ba5b302b711c73b6439956d274cde (patch)
treef547b1bc271a1b9c0f8df616cfb1fb5c2574c43a /lib/api/notes.rb
parentc9abdadd7a08f972d5a12472f9f5ac443e37a6ac (diff)
downloadgitlab-ce-63360adeae3ba5b302b711c73b6439956d274cde.tar.gz
Add `requirements: { id: %r{[^/]+} }` for all projects and groups namespaced API routes
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/notes.rb')
-rw-r--r--lib/api/notes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/notes.rb b/lib/api/notes.rb
index 3b3e45cbd06..29ceffdbd2d 100644
--- a/lib/api/notes.rb
+++ b/lib/api/notes.rb
@@ -9,7 +9,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
NOTEABLE_TYPES.each do |noteable_type|
noteables_str = noteable_type.to_s.underscore.pluralize