Open eleanorreem opened 1 month ago
I'd like to work on this issue. Could you please assign it to me? Thank you!
Thank you @SangilYun you have been assigned this issue! Please follow the directions in our Contributing Guide. We look forward to reviewing your pull request shortly ✨
Support Chayn's mission? ⭐ Please star this repo to help us find more contributors like you! Learn more about Chayn here and explore our projects. 🌸
Overview
Take a read through the umbrella ticket. As a sub task to this ticket we want to phase out the use of
req["user"]
from the user.controller.ts. This most popular endpoint is GET/user/me
. For a short period this endpoint will be less performant as the endpoint will be getting the full user profile twice: once in the AuthGuard and once when we hit the service. However, this hopefully will be solved swiftly as the refactor proceeds.Action Items
user.getUserByFirebaseId
and call ituser.getUserProfile
.getUserByFirebaseId
will be refactored to only return the user and will be used by the FirebaseAuthguard. See detials blocked [ticket] (https://github.com/chaynHQ/bloom-backend/issues/454). The difference between the two functions is that instead of using thefirebaseId
we can use theuserId
instead to get the user.user.getUserProfile
rather than returningreq["user"]
. You will need to pass itreq["userEntity"].id
.