2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 11:35:41 +00:00

Implement frakfurter.app as new exchange host

Closes #5631
This commit is contained in:
Matthias Mair
2023-09-28 13:38:56 +02:00
parent 8ed7fbcba5
commit 0d0bedd7b0

View File

@ -15,19 +15,19 @@ from common.settings import currency_code_default, currency_codes
class InvenTreeExchange(SimpleExchangeBackend):
"""Backend for automatically updating currency exchange rates.
Uses the `exchangerate.host` service API
Uses the `frankfurter.app` service API
"""
name = "InvenTreeExchange"
name = "InvenTreeExchange-frankfurter"
def __init__(self):
"""Set API url."""
self.url = "https://api.exchangerate.host/latest"
self.url = "https://api.frankfurter.app/latest"
super().__init__()
def get_params(self):
"""Placeholder to set API key. Currently not required by `exchangerate.host`."""
"""Placeholder to set API key. Currently not required by `frankfurter.app`."""
# No API key is required
return {
}