Files
handmade-revolt-backend/crates/core/models/src/v0/accounts.rs
T
Zomatreeandizzy d27917b824 chore: migrate authifier into codebase (#658)
Co-authored-by: izzy <me@insrt.uk>
Signed-off-by: Zomatree <me@zomatree.live>
Signed-off-by: izzy <me@insrt.uk>
2026-06-21 00:50:06 +01:00

70 lines
1.6 KiB
Rust

auto_derived!(
/// # Change Email Data
pub struct DataChangeEmail {
/// Valid email address
pub email: String,
/// Current password
pub current_password: String,
}
/// # Change Data
pub struct DataChangePassword {
/// New password
pub password: String,
/// Current password
pub current_password: String,
}
/// # Account Deletion Token
pub struct DataAccountDeletion {
/// Deletion token
pub token: String,
}
/// # Account Data
pub struct DataCreateAccount {
/// Valid email address
pub email: String,
/// Password
pub password: String,
/// Invite code
pub invite: Option<String>,
/// Captcha verification code
pub captcha: Option<String>,
}
pub struct AccountInfo {
#[serde(rename = "_id")]
pub id: String,
pub email: String,
}
/// # Password Reset
pub struct DataPasswordReset {
/// Reset token
pub token: String,
/// New password
pub password: String,
/// Whether to logout all sessions
#[serde(default)]
pub remove_sessions: bool,
}
/// # Resend Information
pub struct DataResendVerification {
/// Email associated with the account
pub email: String,
/// Captcha verification code
pub captcha: Option<String>,
}
/// # Reset Information
pub struct DataSendPasswordReset {
/// Email associated with the account
pub email: String,
/// Captcha verification code
pub captcha: Option<String>,
}
);