OpenClassrooms-Student-Center / OpenClassrooms-Student-Center/P6JS
Gender missing from "userInfos" route data fetch 'GET /api/user-info'
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
It seems for the MyProfile page it is needed to retrieve the gender and yet the /api/user-info does not provide it and if we look at the route definition it is missing :
// Extract user profile information
const userProfile = {
firstName: user.userInfos.firstName,
lastName: user.userInfos.lastName,
createdAt: user.userInfos.createdAt,
age: user.userInfos.age,
weight: user.userInfos.weight,
height: user.userInfos.height,
profilePicture: user.userInfos.profilePicture,
// No gender data being retrieve
};
If we look into the JSON data object the gender is indeed part of the UserInfos Object :
"userInfos": {
"firstName": "Sophie",
"lastName": "Martin",
"age": 32,
"gender": "female",
"profilePicture": "http://localhost:8000/images/sophie.jpg",
"height": 165,
"weight": 60,
"createdAt": "2025-01-01"
},
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GET /api/user-info route and inspect how the userProfile object is assembled from user.userInfos for the MyProfile page. Verify that the returned data includes gender from the JSON userInfos object, and confirm the endpoint response exposes it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100