Skip to content

Change user schema to have a unique avatar property #8

@vitorsaa2k

Description

@vitorsaa2k
  • 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

  1. Remove useless properties from the schema

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions