Skip to content

Deprecating /users/self GET route #1988

@somu-code

Description

@somu-code

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

  • 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions