undo april fools

This commit is contained in:
keyan 2023-04-03 09:08:15 -05:00
parent 9cbc895e29
commit d08d593f69
1 changed files with 1 additions and 2 deletions

View File

@ -11,14 +11,13 @@ async function getPrice (fiat) {
} }
} }
const url = `https://api.coinbase.com/v2/prices/BTC-${fiat}/spot` const url = `https://api.coinbase.com/v2/prices/BTC-${fiat}/spot`
let price = await fetch(url) const price = await fetch(url)
.then((res) => res.json()) .then((res) => res.json())
.then((body) => parseFloat(body.data.amount)) .then((body) => parseFloat(body.data.amount))
.catch((err) => { .catch((err) => {
console.error(err) console.error(err)
return -1 return -1
}) })
price *= 34
cache.set(fiat, { price, createdAt: Date.now() }) cache.set(fiat, { price, createdAt: Date.now() })
return price return price
} }