From a00e112b2c24de29d6700eb4f1ab444723d8a3cc Mon Sep 17 00:00:00 2001 From: ssyyhhrr <44934807+ssyyhhrr@users.noreply.github.com> Date: Thu, 23 Jun 2022 21:26:43 +0100 Subject: [PATCH] DOTD Fix --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {