2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 11:29:00 +00:00

Merge pull request #240 from madisvain/patch-1

Change VATComply API for exchange rates
This commit is contained in:
Alan 2021-11-10 21:46:57 +05:30 committed by GitHub
commit e281b667b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ export async function getExchangeRate({ fromCurrency, toCurrency, date }) {
if (!exchangeRate) {
try {
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();
exchangeRate = data.rates[toCurrency];