Fix login by adding default user deleted value

Login broken in commit a048d313bf
rust
Elnu 1 year ago
parent 21f490c183
commit 4970ffd845

@ -28,9 +28,14 @@ pub struct User {
#[serde(deserialize_with = "deserialize_discriminator")] #[serde(deserialize_with = "deserialize_discriminator")]
pub discriminator: u16, pub discriminator: u16,
pub avatar: Option<String>, pub avatar: Option<String>,
#[serde(default = "default_deleted")]
pub deleted: bool, pub deleted: bool,
} }
fn default_deleted() -> bool {
false
}
impl Username for User { impl Username for User {
fn username(&self) -> String { fn username(&self) -> String {
if self.discriminator == 0 { if self.discriminator == 0 {

Loading…
Cancel
Save