Skip to content

[Feature]: Improve Consistency in getProfile Controller #75

@akofficial10

Description

@akofficial10

Description:
The getProfile controller works correctly, but has some areas that could be improved for consistency with other controllers:

Error handling is less descriptive compared to the register and login.
Response structure is not fully standardised (e.g., missing status codes like 200 or 201 explicitly).
Logging could be made more uniform across all auth-related controllers.
This small inconsistency makes the codebase slightly harder to maintain and less predictable.

Expected improvement:
Standardize response format and status codes.
Ensure error handling follows the same pattern as other controllers.
Keep functionality exactly the same (should still return the user object in req.user).

Metadata

Metadata

Assignees

Labels

GSSoC'25Part of GSSoC'25 programenhancementNew feature or requestlevel 2Intermediate/medium

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions