Changing endpoint in currency conversion
This commit is contained in:
parent
0b291d241a
commit
b270518de8
|
@ -136,7 +136,7 @@ checkInternet()
|
||||||
## Grabs the exchange rate and does the math for converting the currency
|
## Grabs the exchange rate and does the math for converting the currency
|
||||||
convertCurrency()
|
convertCurrency()
|
||||||
{
|
{
|
||||||
exchangeRate=$(httpGet "https://exchangeratesapi.io/api/latest?base=$base&symbols=$base,$exchangeTo" | grep -Eo "[0-9]*[.][0-9]*") > /dev/null
|
exchangeRate=$(httpGet "https://api.exchangeratesapi.io/latest?base=$base&symbols=$base,$exchangeTo" | grep -Eo "[0-9]*[.][0-9]*") > /dev/null
|
||||||
if ! command -v bc &>/dev/null; then
|
if ! command -v bc &>/dev/null; then
|
||||||
oldRate=$exchangeRate
|
oldRate=$exchangeRate
|
||||||
exchangeRate=$(echo $exchangeRate | grep -Eo "^[0-9]*" )
|
exchangeRate=$(echo $exchangeRate | grep -Eo "^[0-9]*" )
|
||||||
|
|
Loading…
Reference in New Issue