email,
password_encrypted,
show_nsfw: data.show_nsfw,
+ show_scores: data.show_scores,
theme: data.theme.to_owned(),
default_sort_type,
default_listing_type,
#[derive(Deserialize)]
pub struct SaveUserSettings {
pub show_nsfw: Option<bool>,
+ pub show_scores: Option<bool>,
+ pub show_avatars: Option<bool>,
pub theme: Option<String>,
pub default_sort_type: Option<i16>,
pub default_listing_type: Option<i16>,
pub new_password: Option<String>,
pub new_password_verify: Option<String>,
pub old_password: Option<String>,
- pub show_avatars: Option<bool>,
pub send_notifications_to_email: Option<bool>,
pub auth: String,
}
default_listing_type: Some(ListingType::Subscribed as i16),
lang: Some("browser".into()),
show_avatars: Some(true),
+ show_scores: Some(true),
send_notifications_to_email: Some(false),
};
show_avatars,
send_notifications_to_email,
validator_time,
+ show_scores,
);
impl ToSafeSettings for LocalUser {
show_avatars,
send_notifications_to_email,
validator_time,
+ show_scores,
)
}
}
show_avatars -> Bool,
send_notifications_to_email -> Bool,
validator_time -> Timestamp,
+ show_scores -> Bool,
}
}
pub show_avatars: bool,
pub send_notifications_to_email: bool,
pub validator_time: chrono::NaiveDateTime,
+ pub show_scores: bool,
}
// TODO redo these, check table defaults
pub lang: Option<String>,
pub show_avatars: Option<bool>,
pub send_notifications_to_email: Option<bool>,
+ pub show_scores: Option<bool>,
}
/// A local user view that removes password encrypted
pub show_avatars: bool,
pub send_notifications_to_email: bool,
pub validator_time: chrono::NaiveDateTime,
+ pub show_scores: bool,
}
--- /dev/null
+alter table local_user drop column show_scores;
--- /dev/null
+alter table local_user add column show_scores boolean default true not null;