mirror of
https://github.com/modrinth/code.git
synced 2026-09-03 13:36:48 +00:00
feat: more details linked account info for support/moderation (#6897)
* feat: show discord + steam ID + github profile in "Show details" user modal * pnpm intl:extract
This commit is contained in:
@@ -481,7 +481,15 @@ pub async fn user_get(
|
||||
let user_id = data.id;
|
||||
|
||||
let mut response: crate::models::users::User = if is_admin {
|
||||
crate::models::users::User::from_full(data)
|
||||
let github_id =
|
||||
data.github_id.and_then(|id| u64::try_from(id).ok());
|
||||
let discord_id = data.discord_id.map(|id| id.to_string());
|
||||
let steam_id = data.steam_id.map(|id| id.to_string());
|
||||
let mut user = crate::models::users::User::from_full(data);
|
||||
user.github_id = github_id;
|
||||
user.discord_id = discord_id;
|
||||
user.steam_id = steam_id;
|
||||
user
|
||||
} else {
|
||||
data.into()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user