diff options
Diffstat (limited to 'lib/api/branches.rb')
-rw-r--r-- | lib/api/branches.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/branches.rb b/lib/api/branches.rb index 999bf1627c1..081e8ffe4f0 100644 --- a/lib/api/branches.rb +++ b/lib/api/branches.rb @@ -8,6 +8,8 @@ module API BRANCH_ENDPOINT_REQUIREMENTS = API::NAMESPACE_OR_PROJECT_REQUIREMENTS.merge(branch: API::NO_SLASH_URL_PART_REGEX) + after_validation { content_type "application/json" } + before do require_repository_enabled! authorize! :download_code, user_project |