mirror of
https://github.com/modrinth/code.git
synced 2026-08-27 18:14:49 +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:
@@ -24,7 +24,6 @@ pub struct LegacyUser {
|
||||
pub has_totp: Option<bool>,
|
||||
pub payout_data: Option<UserPayoutData>, // this was changed in v3, but not ones we want to keep out of v2
|
||||
|
||||
// DEPRECATED. Always returns None
|
||||
pub github_id: Option<u64>,
|
||||
}
|
||||
|
||||
|
||||
@@ -70,8 +70,11 @@ pub struct User {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub moderation_notes: Option<Option<ModerationNote>>,
|
||||
|
||||
// DEPRECATED. Always returns None
|
||||
pub github_id: Option<u64>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub discord_id: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub steam_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
|
||||
@@ -119,6 +122,8 @@ impl From<DBUser> for User {
|
||||
has_password: None,
|
||||
has_totp: None,
|
||||
github_id: None,
|
||||
discord_id: None,
|
||||
steam_id: None,
|
||||
stripe_customer_id: None,
|
||||
allow_friend_requests: None,
|
||||
eligibility_verified_at: None,
|
||||
@@ -180,6 +185,8 @@ impl User {
|
||||
has_password: Some(db_user.password.is_some()),
|
||||
has_totp: Some(db_user.totp_secret.is_some()),
|
||||
github_id: None,
|
||||
discord_id: None,
|
||||
steam_id: None,
|
||||
payout_data: Some(UserPayoutData {
|
||||
paypal_address: db_user.paypal_email,
|
||||
paypal_country: db_user.paypal_country,
|
||||
|
||||
Reference in New Issue
Block a user