mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-17 22:12:12 +00:00
fix: Fix API endpoint for Frankfurter
(cherry picked from commit 33e72111c7)
This commit is contained in:
@@ -109,7 +109,7 @@ def get_api_endpoint(service_provider: str | None = None, use_http: bool = False
|
|||||||
if service_provider == "exchangerate.host":
|
if service_provider == "exchangerate.host":
|
||||||
api = "api.exchangerate.host/convert"
|
api = "api.exchangerate.host/convert"
|
||||||
elif service_provider == "frankfurter.app":
|
elif service_provider == "frankfurter.app":
|
||||||
api = "frankfurter.app/{transaction_date}"
|
api = "api.frankfurter.app/{transaction_date}"
|
||||||
|
|
||||||
protocol = "https://"
|
protocol = "https://"
|
||||||
if use_http:
|
if use_http:
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ def setup_currency_exchange():
|
|||||||
ces.set("result_key", [])
|
ces.set("result_key", [])
|
||||||
ces.set("req_params", [])
|
ces.set("req_params", [])
|
||||||
|
|
||||||
ces.api_endpoint = "https://frankfurter.app/{transaction_date}"
|
ces.api_endpoint = "https://api.frankfurter.app/{transaction_date}"
|
||||||
ces.append("result_key", {"key": "rates"})
|
ces.append("result_key", {"key": "rates"})
|
||||||
ces.append("result_key", {"key": "{to_currency}"})
|
ces.append("result_key", {"key": "{to_currency}"})
|
||||||
ces.append("req_params", {"key": "base", "value": "{from_currency}"})
|
ces.append("req_params", {"key": "base", "value": "{from_currency}"})
|
||||||
|
|||||||
Reference in New Issue
Block a user