diff options
author | Rémy Coutable <remy@rymai.me> | 2017-07-27 13:01:14 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-07-27 14:29:42 +0200 |
commit | 4e3e0dc8d4d742e388372e969324483ab51a3363 (patch) | |
tree | 73749a158717e667c88baaccaf7e5f9b58550a49 /lib/api/api.rb | |
parent | 649382b1c27b09e5b54a5cdb21f078f37ecd7306 (diff) | |
download | gitlab-ce-4e3e0dc8d4d742e388372e969324483ab51a3363.tar.gz |
DRY the branches API requirements definition
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r-- | lib/api/api.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb index 3bdafa3edc1..045a0db1842 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -86,6 +86,9 @@ module API helpers ::API::Helpers helpers ::API::Helpers::CommonHelpers + NO_SLASH_URL_PART_REGEX = %r{[^/]+} + PROJECT_ENDPOINT_REQUIREMENTS = { id: NO_SLASH_URL_PART_REGEX }.freeze + # Keep in alphabetical order mount ::API::AccessRequests mount ::API::AwardEmoji |