FirebaseExtended / FirebaseExtended/firestore-leaderboards-codelab
Mistake in params order in the code lab
- Dominant language
- JavaScript
- Stars
- 5
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
In functions/index in the addScore function we can see the following call:
helpers.createScore(user, score, admin.firestore())
First argument is user, the second one is score. But in the code lab we can see the following implementation of the createScore function:
async function createScore(score, playerID, firestore) {
return firestore.collection("scores").doc().create({
user: playerID,
score: score,
});
}
As you see here the first argument is score and the second one is playerID. Please, correct the codelab example code like so it will look like this:
async function createScore(playerID, score, firestore) {
Contributor guide
Assessment
This issue has not been assessed yet.