-
Notifications
You must be signed in to change notification settings - Fork 33
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 getUserProfile subscriptions #430
Comments
Can I try this one? :) |
And I have on question regarding the ticket description, I don't see any left join in the service method of userService.getUserByFirebaseId, as the typeorm query there doesnt specify the relations parameter, are you referring to the controller method with the same name which calls the service method getUserProfile? |
Thank you @leoseg you have been assigned this issue! Support Chayn's mission? ⭐ Please star this repo to help us find more contributors like you! |
Ah yes sorry! There was a recent refactor which means its the getUserProfile function you want to address. However, I just noticed the frontend ticket hasn't been done so this ticket should be blocked 🤔 Would you be interested in doing that work at all? Otherwise you might need to hold out until that piece of work is done by someone else. |
I already started, I could do the refactoring write some unittests and test manually trough swagger, and open a pull request for a first review after that :) The end2end testing with cypress I could do later when its ready. One quick question: which API token do I use for swagger it is the one from firebase? because this one is not working for me |
Removed joins from user.service.ts getUserProfile with subscriptionUser and removed the getUserDto fields, the corresponding methods in serialize.ts, as well as the ISubscription interface
Added unittests for getUserProfile
Fixxed docker-compose for linux
#710 I opened a first pull request for a first review, I also edited the docker-compose as proposed in #588 as i needed to do it to get docker-compose running on my ubuntu :) I can do further e2e testing when the frontend is ready :) @eleanorreem |
@leoseg thanks for opening the PR. I haven't used Swagger to test API endpoints but I'm imagining you need to have the Firebase Env variables for the backend. Once you have that, I usually use postman and hit the /auth/signin endpoint with a JSON body of @kyleecodes I don't know if we have any documentation about this but this would be a good thing for us to do! |
Thanks :) Manual testing trough swagger API seems to work, when the frontend is up to date I will do further tests with cypress! |
Overview
We want to start breaking up the GET /user/me request and only fetch information on the pages it is needed. This is starting with subscriptions. We created a new endpoint in this ticket to have a bespoke endpoint for getting subscriptions . The frontend migration is in this ticket and blocks this refactor. After the frontend has been migrated over, we can start breaking up the GetUserDto and remove subscriptions from the object.
Action Items
The text was updated successfully, but these errors were encountered: