diff options
author | Imre Farkas <ifarkas@gitlab.com> | 2018-11-08 15:18:17 +0300 |
---|---|---|
committer | Imre Farkas <ifarkas@gitlab.com> | 2018-11-28 14:54:11 +0300 |
commit | b1e070bf4957a558ac51315dd4a6277056047e8a (patch) | |
tree | 07f98719501b51e58f62762aaca80b7239d53231 /lib/api/branches.rb | |
parent | 1cd570cf77b79f37f30ef3ccd399c337056aa236 (diff) |
Fix API::Namespaces to accept namepaces with dots
It also renames the API::PROJECT_ENDPOINT_REQUIREMENTS constant to
API::NAMESPACE_OR_PROJECT_REQUIREMENTS
Diffstat (limited to 'lib/api/branches.rb')
-rw-r--r-- | lib/api/branches.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/branches.rb b/lib/api/branches.rb index 2735d410c8e..e7e58ad0e66 100644 --- a/lib/api/branches.rb +++ b/lib/api/branches.rb @@ -6,7 +6,7 @@ module API class Branches < Grape::API include PaginationParams - BRANCH_ENDPOINT_REQUIREMENTS = API::PROJECT_ENDPOINT_REQUIREMENTS.merge(branch: API::NO_SLASH_URL_PART_REGEX) + BRANCH_ENDPOINT_REQUIREMENTS = API::NAMESPACE_OR_PROJECT_REQUIREMENTS.merge(branch: API::NO_SLASH_URL_PART_REGEX) before { authorize! :download_code, user_project } @@ -20,7 +20,7 @@ module API params do requires :id, type: String, desc: 'The ID of a project' end - resource :projects, requirements: API::PROJECT_ENDPOINT_REQUIREMENTS do + resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do desc 'Get a project repository branches' do success Entities::Branch end |