summaryrefslogtreecommitdiff
path: root/lib/api/namespaces.rb
diff options
context:
space:
mode:
authorImre Farkas <ifarkas@gitlab.com>2018-11-08 13:18:17 +0100
committerImre Farkas <ifarkas@gitlab.com>2018-11-28 12:54:11 +0100
commitb1e070bf4957a558ac51315dd4a6277056047e8a (patch)
tree07f98719501b51e58f62762aaca80b7239d53231 /lib/api/namespaces.rb
parent1cd570cf77b79f37f30ef3ccd399c337056aa236 (diff)
downloadgitlab-ce-if-52811-fix_namespaces_api_routing.tar.gz
Fix API::Namespaces to accept namepaces with dotsif-52811-fix_namespaces_api_routing
It also renames the API::PROJECT_ENDPOINT_REQUIREMENTS constant to API::NAMESPACE_OR_PROJECT_REQUIREMENTS
Diffstat (limited to 'lib/api/namespaces.rb')
-rw-r--r--lib/api/namespaces.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/namespaces.rb b/lib/api/namespaces.rb
index 76639fbb031..06a57e3cd6f 100644
--- a/lib/api/namespaces.rb
+++ b/lib/api/namespaces.rb
@@ -28,7 +28,7 @@ module API
params do
requires :id, type: String, desc: "Namespace's ID or path"
end
- get ':id' do
+ get ':id', requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
present user_namespace, with: Entities::Namespace, current_user: current_user
end
end