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

Refactor Event Check-In to query path field instead of document name #49

Open
3 tasks
harshasrikara opened this issue Feb 23, 2021 · 0 comments
Open
3 tasks

Comments

@harshasrikara
Copy link
Member

Refactor Event Check-In
Currently the Event Check-In system makes a query for a document that has the name of the checkin path. For example if someone lands on /checkin/mycoolevent then we search for a document called mycoolevent to retrieve event information from. However, this causes challenges in the future since we cannot reuse the same link for a different event. Cloud Firestore prevents us from renaming documents and so querying based on document names means we are locked into using it for just that one event.

We would instead like to search for the document that has the path_name value set to the checkin link. This ensures that in the future can easily adapt a link to point to a different event simply by modifying the path_name value. Making this change also means that when we create a new event we no longer care about what the name of the document is.

Task List

  • Refactor query here. View how to make a firestore query here
  • Change document write here. Save the document ref from the previous task to reuse here instead of making a fresh query again.
  • Change document write here when creating a new event. We no longer care about the document name so use .collection(event_collection).add().
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

No branches or pull requests

1 participant