- Goal: Have an objective and more concise user object
- Depends On: None
Tips on how to solve/should be solved
Because of the way passport.js works, when a user is logged in, an array with multiple photos is returned. It should be converted to a property with a single photo and no more an array but a string containing the photoUrl with the biggest resolution from the array.
Try getting some inspiration from the user object on Key-Drop.com
{
affiliateType: "basic",
avatar: "https://avatars.steamstatic.com/a2f3049dc9e101c3e960c52c285faecf8490f61e_full.jpg",
balance: 0,
steamId: "76561198284504776",
tradeURL: "https://steamcommunity.com/tradeoffer/new/?partner=324239048&token=TCEZ1m7x",
userName: "Heexay",
}
To do
- Remove useless properties from the schema
Tips on how to solve/should be solved
Because of the way passport.js works, when a user is logged in, an array with multiple photos is returned. It should be converted to a property with a single photo and no more an array but a string containing the photoUrl with the biggest resolution from the array.
Try getting some inspiration from the user object on Key-Drop.com
To do