mirror of
https://github.com/ssyyhhrr/stewardle.git
synced 2025-11-08 10:33:46 -05:00
23:59 updateDrivers /winner Fix
This commit is contained in:
3
app.js
3
app.js
@@ -104,7 +104,7 @@ schedule.scheduleJob("* * * * *", () => {
|
||||
})
|
||||
|
||||
async function updateDrivers() {
|
||||
drivers = {}
|
||||
let newDrivers = {}
|
||||
for (let i = 2000; i <= year; i++) {
|
||||
console.log(`Scraping F1 ${i} Season...`)
|
||||
try {
|
||||
@@ -132,6 +132,7 @@ async function updateDrivers() {
|
||||
if (i !== year) throw ""
|
||||
}
|
||||
}
|
||||
drivers = newDrivers
|
||||
|
||||
if (fs.existsSync("assets/drivers.json")) {
|
||||
console.log("Deleting drivers.json...")
|
||||
|
||||
Reference in New Issue
Block a user