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

Create new GET /user/me endpoint #417

Closed
3 tasks
eleanorreem opened this issue May 6, 2024 · 3 comments
Closed
3 tasks

Create new GET /user/me endpoint #417

eleanorreem opened this issue May 6, 2024 · 3 comments
Assignees

Comments

@eleanorreem
Copy link
Contributor

Overview

We want to at some point be using Rest properly. Currently, this is not the case. Each endpoint which deviates from REST patterns should be duplicated and corrected. We can later migrate the frontend over to the correct endpoint and delete the incorrect usage. We don't need to be super strict but just better than where we are now.

Action Items

  • See bloom-backend/src/user/user.controller.ts. Look for the /v1/user/me endpoint
  • Duplicate the endpoint but as a GET request. Do not delete the old version. The functionality should be the same.
  • Write some comments to explain the transition and which endpoint should be used and which is going to be archived
@mayank-sahai
Copy link
Contributor

@eleanorreem looks like a quick win. I Would like to work on it.

Just a small question. what would you prefer ?

  1. New get Method function with name -> getUserProfileByFirebaseId
    or
  2. New get Method function with getUserByFirebaseId and rename the post method to getUserProfileByFirebaseId (it will be discarded in future anyway)

I know this question is silly but just asking so that I don't ruin the naming convention if there is any.

Copy link

github-actions bot commented May 8, 2024

Thank you for your interest in contributing to Chayn! Please carefully read the CONTRIBUTING.md file and the README.md file for guidance. Let us know if you have any questions. Good luck!

@kyleecodes
Copy link
Member

@mayank-sahai I've assigned you this issue.
And that's a really good question.
I would go with option 2, just make sure it passes all tests.
If it causes tests failures or any unexpected behavior I would use option 1 instead.
Either option ultimately works, thank you for asking!

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

No branches or pull requests

3 participants