website-backend icon indicating copy to clipboard operation
website-backend copied to clipboard

Deprecating `/users/self` GET route

Open somu-code opened this issue 1 year ago • 0 comments

Issue Description

Deprecate the/users/self API from website-backend. And adding a new route that will serve the purpose of /users/self. Old issue link

Expected Behavior

The user's data should return from an API that has some meaningful name.

Current Behavior

Currently, /users/self GET route returns all the details of the currently authenticated user.

User Story

  • As a user, I want to access my details and tasks details without relying on a generic endpoint, ensuring a more personalized and secure experience.

Developer Story

  • As a developer, I want to ensure the API remains efficient and easy to maintain as the user base grows.

Requirements

  • Delete /users/self endpoint.
  • We will be needing a new route that will server the purpose of /users/self.
  • Either we can use /users resource with a query param(id), something like /users?id=some_id, or can create new endpoints like /users/me or /users/profile.

Screenshots

/users/self

Screenshot from 2024-05-17 13-28-38

/users?id=66wkaNSpTskaVTmSSRPQ

Screenshot from 2024-06-16 00-43-05

Reproducibility

  • [x] This issue is reproducible
  • [ ] This issue is not reproducible

Steps to Reproduce

  1. Make a GET request to /users/self and /users?id=some_id endpoints.

Severity/Priority

  • [ ] Critical
  • [ ] High
  • [ ] Medium
  • [ ] Low

Additional Information

Checklist

  • [ ] I have read and followed the project's code of conduct.
  • [ ] I have searched for similar issues before creating this one.
  • [ ] I have provided all the necessary information to understand and reproduce the issue.
  • [ ] I am willing to contribute to the resolution of this issue.

somu-code avatar Mar 26 '24 17:03 somu-code