mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
Change VATComply API for exchange rates
Change the exchangeratesapi.io to https://api.vatcomply.com rates API. I'm the original author of Exchangerates API which now has a paywall and was acquired some years ago. VATComply API will not be sold and provides the same API for exchange rates for free without requiring a API key.
This commit is contained in:
parent
3afdb72ed3
commit
d0c6c27cf6
@ -14,7 +14,7 @@ export async function getExchangeRate({ fromCurrency, toCurrency, date }) {
|
|||||||
if (!exchangeRate) {
|
if (!exchangeRate) {
|
||||||
try {
|
try {
|
||||||
let res = await fetch(
|
let res = await fetch(
|
||||||
`https://api.exchangeratesapi.io/${date}?base=${fromCurrency}&symbols=${toCurrency}`
|
`https://api.vatcomply.com/${date}?base=${fromCurrency}&symbols=${toCurrency}`
|
||||||
);
|
);
|
||||||
let data = await res.json();
|
let data = await res.json();
|
||||||
exchangeRate = data.rates[toCurrency];
|
exchangeRate = data.rates[toCurrency];
|
||||||
|
Loading…
Reference in New Issue
Block a user