API Changes - convertCurrency

This commit is contained in:
Divlo 2019-09-13 23:00:41 +02:00
parent 6f78363db8
commit dd212a0ac1
2 changed files with 4 additions and 5 deletions

View File

@ -178,10 +178,10 @@ function getRandomQuote() {
}
// Convertis des euros (€) dans une autre devise
function convertCurrency(urlFixerIO, currency, euroValue) {
function convertCurrency(currency, euroValue) {
$.ajax({
url : urlFixerIO,
dataType : "jsonp",
url : 'https://api.exchangeratesapi.io/latest',
dataType : "json",
success: function (jsonFixer) {
switch(currency) {
case '£':

View File

@ -175,8 +175,7 @@ $(function () {
else
{
euroValue = parseFloat(euroValue);
let urlFixer = 'http://data.fixer.io/api/latest?access_key=' + config.APIkeyFixer;
convertCurrency(urlFixer, euroToCurrency, euroValue);
convertCurrency(euroToCurrency, euroValue);
}
});