Closed F0laf0lu closed 3 months ago
@F0laf0lu missing end-to-end testing specs
API should be protected, with a token so it is sure they're signed in
In the first requirement, update the endpoint to follow the convention
Be consistent in versioning your endpoints
Success Response formatting is not standard
Description
Create an API endpoint to allow users to view their profile settings. The user must be signed in to view their details.
Acceptance Criteria
Authentication
View Profile
Response Formats
Error Handling
Purpose
Provide an endpoint for users to view their profile settings.
Requirements
[ ] Implement an endpoint to retrieve user profile settings.
GET /api/v1/profile
to retrieve the current user's profile settings.[ ] Ensure the endpoint handles authentication securely with token-based authentication.
401 Unauthorized
if the user is not authenticated.[ ] Handle responses and errors appropriately.
200 OK
with the user's profile settings on successful retrieval.error
field containing a descriptive message.Unit Tests
GET /api/v1/profile Endpoint:
End-to-End Tests
Authenticated User:
Unauthenticated User:
Profile Data Integrity:
Expected Outcome
An API endpoint that enables users to view their profile settings seamlessly.