Skip to content
New issue

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

fix: Fix processing of Firestore collection.get() #17

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

darren2hang
Copy link
Contributor

@darren2hang darren2hang commented Apr 18, 2023

There was a bug in db.client and the Song.all() and Lobby.all() function
It was using map to process the result of openCollection().get()
Instead the correct way to use it is with forEach

This is a guide on getting all the documents from a Firestore collection
https://firebase.google.com/docs/firestore/query-data/get-data#get_multiple_documents_from_a_collection

To test, just make sure Lobby.all() and Song.all() can run

@darren2hang darren2hang marked this pull request as ready for review April 19, 2023 01:33
@darren2hang darren2hang changed the title fix: Fix Firestore collection.get() fix: Fix processing of Firestore collection.get() Apr 19, 2023
Copy link

@trevorong trevorong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mergify mergify bot merged commit 37c508f into main Apr 19, 2023
3 checks passed
@mergify
Copy link

mergify bot commented Apr 19, 2023

Thanks for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@darren2hang darren2hang deleted the fixGetCollectionItems branch April 19, 2023 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants