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:
parent
bee07a3104
commit
697cfb1f58
@ -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
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user