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

Remove unnecessary joins from develop branch #645

Closed

Conversation

reidn3r
Copy link
Contributor

@reidn3r reidn3r commented Sep 19, 2024

Now, from develop branch:

  • These change tries to solve the issue Refactor user fetching to remove unnessary joins #454
  • Refactored the getUserByFirebaseId function to only fetch the user data, removing unnecessary joins/relations.
  • Searched for any functions that rely on req['userEntity'] to ensure no existing functionality is broken. I found no instances of such functions, so it seems ok.
  • Ran all tests and confirmed they passed successfully

swetha-charles and others added 30 commits January 24, 2023 17:43
* Update dockerfile to node version 16

6366307229 / Create subscriptions table

* Add subscription entity

This will hold any subscriotions related to Bloom.
For now, this will be whatsapp but in the future, we may also have email subscriptions.

6366307229 / Create subscriptions table

* Create user subscription table

This will hold information on the subscriptions a user has.
It will also hold information on when a subscription was cancelled.

882f38dfea / Create user subscriptions table

* Add migration to create subscription user table

882f38dfea / Create user subscriptions table

* Add test fixes

882f38dfea / Create user subscriptions table
Merge to bring in whatsapp subscription endpoint to main
These were missed out in the original migration which created subscription tables.
The base entity which brings in the createdAt and updatedAt fields automatically has now been renamed to base bloom entity.

This prevents the type orm base entity from being imported by mistake when the intention is to import the bloom base entity.

5bc71b407d
6b935e1bc5 / Add verification for whatsapp endpoints
Add logging and add status enum for when subscription already exists.

Also added number sanitization to the service. This prevents numbers with white spaces being accepted by the whatsapp endpoint.

6b935e1bc5 / Add verification for whatsapp endpoints
6b935e1bc5 / Add verification for whatsapp endpoints
6b935e1bc5 / Improvements for whatsapp backend
6b935e1bc5 / Improvements for whatsapp backend
Once a subscription is created, the created object is then used to retrieve the full subscription info. This includes the subscription name.

This will allow the front end to parse different subscriptions as needed.
6b935e1bc5 / Improvements for whatsapp backend
This will allow the front end to parse different subscriptions as needed.

6b935e1bc5 / Improvements for whatsapp backend
6b935e1bc5 / Improvements for whatsapp backend
Create new course user if missing
Update error status code to 401 when ID token expired
Update partner-access table to remove unique user constraint
Release therapy email case sensitivity fix, cypress delete user route and better error handling
Release new logging & dependency updates
Update therapy session table to handle null & fix issue with session completion
annarhughes and others added 22 commits June 4, 2024 21:50
@eleanorreem
Copy link
Contributor

@reidn3r Thanks for this! This all works for me - the git history is just a bit strange. Is there any way of you fixing this?

@reidn3r
Copy link
Contributor Author

reidn3r commented Sep 20, 2024

@eleanorreem Maybe it was strange because my branch was some commits behind from base branch?? I've updated the branch via GitHub, and I believe it's correct now.

Sorry for these mistakes, its my first open source contribution 😬

@kyleecodes
Copy link
Member

@reidn3r Thanks for opening a new PR.
I see the same issue persist. I suggest syncing your forked develop branch, creating a new branch from the updated develop branch, and reimplementing the same changes in a new PR. See guidance on how to update your fork here: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@reidn3r
Copy link
Contributor Author

reidn3r commented Sep 22, 2024

@kyleecodes @eleanorreem
I created a new branch from the synced develop branch and reimplemented the code. I opened a new PR and you can find it here

Hope it's correct now

@eleanorreem eleanorreem closed this Oct 1, 2024
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.

5 participants