]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/source/local_user.rs
Get rid of Safe Views, use serde_skip (#2767)
[lemmy.git] / crates / db_schema / src / source / local_user.rs
index 37a559bc6da011d66c0d06098e6a70dd653a30d5..c38a5ac640558e6047532a1d502345dcdd18dace 100644 (file)
@@ -10,6 +10,7 @@ use typed_builder::TypedBuilder;
 pub struct LocalUser {
   pub id: LocalUserId,
   pub person_id: PersonId,
+  #[serde(skip)]
   pub password_encrypted: String,
   pub email: Option<String>,
   pub show_nsfw: bool,
@@ -28,30 +29,6 @@ pub struct LocalUser {
   pub accepted_application: bool,
 }
 
-/// A local user view that removes password encrypted
-#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
-#[cfg_attr(feature = "full", derive(Queryable, Identifiable))]
-#[cfg_attr(feature = "full", diesel(table_name = local_user))]
-pub struct LocalUserSettings {
-  pub id: LocalUserId,
-  pub person_id: PersonId,
-  pub email: Option<String>,
-  pub show_nsfw: bool,
-  pub theme: String,
-  pub default_sort_type: i16,
-  pub default_listing_type: i16,
-  pub interface_language: String,
-  pub show_avatars: bool,
-  pub send_notifications_to_email: bool,
-  pub validator_time: chrono::NaiveDateTime,
-  pub show_bot_accounts: bool,
-  pub show_scores: bool,
-  pub show_read_posts: bool,
-  pub show_new_post_notifs: bool,
-  pub email_verified: bool,
-  pub accepted_application: bool,
-}
-
 #[derive(Clone, TypedBuilder)]
 #[builder(field_defaults(default))]
 #[cfg_attr(feature = "full", derive(Insertable))]