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

Consistently store user names in matches and requests #129

Open
nicholaschiang opened this issue Oct 16, 2020 · 0 comments
Open

Consistently store user names in matches and requests #129

nicholaschiang opened this issue Oct 16, 2020 · 0 comments
Assignees
Labels
backlog Low priority implementation changes type:bug Something isn't working in a story

Comments

@nicholaschiang
Copy link
Member

nicholaschiang commented Oct 16, 2020

Is your feature request related to a problem? Please describe.
In order to speed up the client-side data fetching, I added a name and photo property to the Person objects that are stored in matches and requests. This way, the client only has to fetch the /api/matches endpoint once (instead of fetching partial data and then calling the /api/users/[id] endpoint to get the user's data). This, however, led to data duplication (that is common in NoSQL schema-less databases like Firestore) which can result in inaccurate information (i.e. no single source of truth).

For example, the name properties of some documents are the truncated versions (i.e. "John D." instead of "John Doe"). We want to be consistent in our decisions to truncate data, and this was not intentional (and thus isn't consistent).

Describe the solution you'd like
Once #128 is fixed, ensure that those name properties aren't truncated when the POST /api/matches and PUT /api/matches/[id] endpoints are called.

Additional context
Related to 528fa026.

@nicholaschiang nicholaschiang added type:bug Something isn't working in a story category:back-end p3 Normal priority tasks labels Oct 16, 2020
@nicholaschiang nicholaschiang self-assigned this Oct 16, 2020
@nicholaschiang nicholaschiang added backlog Low priority implementation changes and removed category:back-end p3 Normal priority tasks labels May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Low priority implementation changes type:bug Something isn't working in a story
Projects
None yet
Development

No branches or pull requests

1 participant