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: normalize firestore document path #106

Merged
merged 4 commits into from
Jun 20, 2023
Merged

fix: normalize firestore document path #106

merged 4 commits into from
Jun 20, 2023

Conversation

russellwheatley
Copy link
Member

@russellwheatley russellwheatley commented Jun 19, 2023

This PR should be merged first to fix the formatting CI failure: #108

Created a util function for normalizing Firestore document paths for each Firestore event listener.

fix #91

We tested the implementation by running Functions emulator. Here is a sample log of the path coming into the function before and after the path is normalized:

Print logs to show before and after we normalize the path:
Screenshot 2023-06-19 at 13 49 08

Output on the console for "created", "written", "updated" & "deleted":
Screenshot 2023-06-19 at 14 19 46

We've also created a unit test for the normalize function here

@Salakar Salakar marked this pull request as ready for review June 19, 2023 16:23
@exaby73 exaby73 merged commit 0ae6070 into main Jun 20, 2023
7 checks passed
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.

Firestore functions doesn't ignore / prefix
3 participants