Use a constant for the API Entreprise URL

This commit is contained in:
gregoirenovel 2018-08-27 16:12:34 +02:00
parent 625f3696f1
commit 9284afc649
3 changed files with 3 additions and 7 deletions

View file

@ -45,7 +45,7 @@ class ApiEntreprise::API
end
def self.url(resource_name, siret_or_siren)
[base_url, resource_name, siret_or_siren].join("/")
[API_ENTREPRISE_URL, resource_name, siret_or_siren].join("/")
end
def self.params(siret_or_siren, procedure_id)
@ -62,8 +62,4 @@ class ApiEntreprise::API
def self.token
Rails.application.secrets.api_entreprise[:key]
end
def self.base_url
Rails.application.secrets.api_entreprise[:base_url]
end
end