1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-25 19:52:36 +01:00

fix user profile not displaying correctly

This commit is contained in:
Puyodead1 2022-09-01 11:05:38 -04:00 committed by Madeline
parent bee07a3104
commit 697cfb1f58
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -89,6 +89,12 @@ router.get(
bot: user.bot,
};
const userProfile = {
bio: req.user_bot ? null : user.bio,
accent_color: user.accent_color,
banner: user.banner
};
const guildMemberDto = guild_member
? {
avatar: guild_member.avatar,
@ -120,8 +126,9 @@ router.get(
premium_since: user.premium_since, // TODO
mutual_guilds: mutual_guilds, // TODO {id: "", nick: null} when ?with_mutual_guilds=true
user: userDto,
guild_member: guildMemberDto,
guild_member_profile: guildMemberProfile
user_profile: userProfile,
guild_member: guild_id && guildMemberDto,
guild_member_profile: guild_id && guildMemberProfile
});
});