diff options
author | Imre Farkas <ifarkas@gitlab.com> | 2018-11-08 13:18:17 +0100 |
---|---|---|
committer | Imre Farkas <ifarkas@gitlab.com> | 2018-11-28 12:54:11 +0100 |
commit | b1e070bf4957a558ac51315dd4a6277056047e8a (patch) | |
tree | 07f98719501b51e58f62762aaca80b7239d53231 /lib/api/api.rb | |
parent | 1cd570cf77b79f37f30ef3ccd399c337056aa236 (diff) | |
download | gitlab-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/api.rb')
-rw-r--r-- | lib/api/api.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb index 8e259961828..194c2199752 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -7,8 +7,8 @@ module API LOG_FILENAME = Rails.root.join("log", "api_json.log") NO_SLASH_URL_PART_REGEX = %r{[^/]+} - PROJECT_ENDPOINT_REQUIREMENTS = { id: NO_SLASH_URL_PART_REGEX }.freeze - COMMIT_ENDPOINT_REQUIREMENTS = PROJECT_ENDPOINT_REQUIREMENTS.merge(sha: NO_SLASH_URL_PART_REGEX).freeze + NAMESPACE_OR_PROJECT_REQUIREMENTS = { id: NO_SLASH_URL_PART_REGEX }.freeze + COMMIT_ENDPOINT_REQUIREMENTS = NAMESPACE_OR_PROJECT_REQUIREMENTS.merge(sha: NO_SLASH_URL_PART_REGEX).freeze insert_before Grape::Middleware::Error, GrapeLogging::Middleware::RequestLogger, |