We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey how to create some things in the database mongodb because it's return
`throw error; ^
TypeError: Cannot read properties of undefined (reading '0') at /home/pi/Documents/a.-./stats-king/index.js:34:48`
here is the line (line 29 to 37):
app.get('/', (req, res) => { db.collection('playerLeaderboard').find({ id : 'global' }).toArray((err, docs) => { if(err) console.log(err) db.collection('clanLeaderboard').find({ id : 'global' }).toArray((err, docs2) => { if(err) console.log(err) res.render('home', { players : docs[0].playerLeaderboard.slice(0, 10), clans : docs2[0].clanLeaderboard.slice(0, 10)}) }) }) })
thanks for your response !
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey how to create some things in the database mongodb because it's return
`throw error;
^
TypeError: Cannot read properties of undefined (reading '0')
at /home/pi/Documents/a.-./stats-king/index.js:34:48`
here is the line (line 29 to 37):
app.get('/', (req, res) => { db.collection('playerLeaderboard').find({ id : 'global' }).toArray((err, docs) => { if(err) console.log(err) db.collection('clanLeaderboard').find({ id : 'global' }).toArray((err, docs2) => { if(err) console.log(err) res.render('home', { players : docs[0].playerLeaderboard.slice(0, 10), clans : docs2[0].clanLeaderboard.slice(0, 10)}) }) }) })
thanks for your response !
The text was updated successfully, but these errors were encountered: