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:
commit
67158e8660
2 changed files with 9 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue