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 in getUserByFirebaseId method #633

Closed
wants to merge 74 commits into from

Conversation

reidn3r
Copy link
Contributor

@reidn3r reidn3r commented Sep 13, 2024

These change tries to solve the issue #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 25 commits April 16, 2024 17:27
@reidn3r
Copy link
Contributor Author

reidn3r commented Sep 17, 2024

@annarhughes @eleanorreem @swetha-charles @kyleecodes Hi! Could you please review this PR?

@kyleecodes
Copy link
Member

Hi @reidn3r, I've pinged devs for review.
However is it possible to make this pull request again, ensuring to fork from the develop branch instead of main? Develop is our default branch, not main. Forking from the wrong branch results in old commit histories being included in pull request, as we see here. We need to keep branch histories synced.
Thanks for your patience!

@reidn3r
Copy link
Contributor Author

reidn3r commented Sep 19, 2024

Hi @kyleecodes,

Thank you for the feedback and for pinging the developers for review!

I made the necessary changes and created a new Pull Request from the develop branch. You can find it here.

Thanks for your patience!

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