diff --git a/app.js b/app.js index 15333f2..e107687 100644 --- a/app.js +++ b/app.js @@ -86,7 +86,6 @@ async function main() { } async function updateDrivers() { - let drivers = {} for (let i = 2000; i <= year; i++) { console.log(`Scraping F1 ${i} Season...`) await axios.get(`http://ergast.com/api/f1/${i}/driverStandings.json?limit=1000`).then(res => { @@ -127,6 +126,7 @@ function dotd() { driver = getRandomProperty(drivers) console.log(`Driver of the Day is ${driver}!`) console.log(drivers[driver]) + drivers = {} } function getRandomProperty(obj) {