Merge pull request #3833 from betagouv/add-api-entreprise-feature-flag

Ajout d'un feature-flag pour désactiver l'API INSEE v3
This commit is contained in:
Nicolas Bouilleaud 2019-05-02 10:51:15 +02:00 committed by GitHub
commit 67158e8660
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -40,7 +40,13 @@ class ApiEntreprise::API
end
def self.url(resource_name, siret_or_siren)
[API_ENTREPRISE_URL, resource_name, siret_or_siren].join("/")
base_url = [API_ENTREPRISE_URL, resource_name, siret_or_siren].join("/")
if Flipflop.insee_api_v3?
base_url += "?with_insee_v3=true"
end
base_url
end
def self.params(siret_or_siren, procedure_id)

View file

@ -20,6 +20,8 @@ Flipflop.configure do
group :production do
feature :remote_storage,
default: ENV['FOG_ENABLED'] == 'enabled'
feature :insee_api_v3,
default: true
feature :weekly_overview,
default: ENV['APP_NAME'] == 'tps'
feature :pre_maintenance_mode