Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r--lib/api/api.rb29
1 files changed, 2 insertions, 27 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb
index a287ffbfcd8..54e5cc5c8d0 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -130,32 +130,6 @@ module API
formatter :json, Gitlab::Json::GrapeFormatter
content_type :json, 'application/json'
- # Remove the `text/plain+deprecated` with `api_always_use_application_json` feature flag
- # There is a small chance some users depend on the old behavior.
- # We this change under a feature flag to see if affects GitLab.com users.
- # The `+deprecated` is added to distinguish content type
- # as defined by `API::API` vs ex. `API::Repositories`
- content_type :txt, 'text/plain+deprecated'
-
- before do
- # the feature flag workaround is only for `.txt`
- api_format = env[Grape::Env::API_FORMAT]
- next unless api_format == :txt
-
- # get all defined content-types for the endpoint
- api_endpoint = env[Grape::Env::API_ENDPOINT]
- content_types = api_endpoint&.namespace_stackable_with_hash(:content_types).to_h
-
- # Only overwrite `text/plain+deprecated`
- if content_types[api_format] == 'text/plain+deprecated'
- if Feature.enabled?(:api_always_use_application_json, default_enabled: :yaml)
- content_type 'application/json'
- else
- content_type 'text/plain'
- end
- end
- end
-
# Ensure the namespace is right, otherwise we might load Grape::API::Helpers
helpers ::API::Helpers
helpers ::API::Helpers::CommonHelpers
@@ -267,6 +241,7 @@ module API
mount ::API::ProjectTemplates
mount ::API::Terraform::State
mount ::API::Terraform::StateVersion
+ mount ::API::Terraform::Modules::V1::Packages
mount ::API::PersonalAccessTokens
mount ::API::ProtectedBranches
mount ::API::ProtectedTags
@@ -323,4 +298,4 @@ module API
end
end
-API::API.prepend_ee_mod
+API::API.prepend_mod