1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 10:22:39 +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 f69aaa223e
commit ae199e3445

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
});
});