diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2019-01-31 13:13:23 +0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2019-01-31 13:13:23 +0300 |
commit | a612bd070862097893103c4babc63df9ad45b214 (patch) | |
tree | a16a646706d9a729badd836da0824eb0ba5121b5 /lib/api/api.rb | |
parent | 33200ed6904b00fc6c24363e29f4a8de895fb6c1 (diff) |
Unify user requirements for API slugs
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r-- | lib/api/api.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb index 59b67c67f9d..8dd4e37ef7f 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -9,6 +9,7 @@ module API NO_SLASH_URL_PART_REGEX = %r{[^/]+} 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 + USER_REQUIREMENTS = { user_id: NO_SLASH_URL_PART_REGEX }.freeze insert_before Grape::Middleware::Error, GrapeLogging::Middleware::RequestLogger, |