X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_schema%2Fsrc%2Fimpls%2Flocal_user.rs;h=a35096dca1cbcb90ebb4981fcf1ec033659b2921;hb=985fe24669d3fdeecc0aa76cc74dd6570cbad5c8;hp=650eac65c1d39f5cb1dabedb303e664e266ca794;hpb=48f187188bce9f5fa1ac8ee09615540ee4df8540;p=lemmy.git diff --git a/crates/db_schema/src/impls/local_user.rs b/crates/db_schema/src/impls/local_user.rs index 650eac65..a35096dc 100644 --- a/crates/db_schema/src/impls/local_user.rs +++ b/crates/db_schema/src/impls/local_user.rs @@ -18,79 +18,6 @@ use bcrypt::{hash, DEFAULT_COST}; use diesel::{dsl::insert_into, result::Error, ExpressionMethods, QueryDsl}; use diesel_async::RunQueryDsl; -mod safe_settings_type { - use crate::{ - schema::local_user::columns::{ - accepted_application, - default_listing_type, - default_sort_type, - email, - email_verified, - id, - interface_language, - person_id, - send_notifications_to_email, - show_avatars, - show_bot_accounts, - show_new_post_notifs, - show_nsfw, - show_read_posts, - show_scores, - theme, - validator_time, - }, - source::local_user::LocalUser, - traits::ToSafeSettings, - }; - - type Columns = ( - id, - person_id, - email, - show_nsfw, - theme, - default_sort_type, - default_listing_type, - interface_language, - show_avatars, - send_notifications_to_email, - validator_time, - show_bot_accounts, - show_scores, - show_read_posts, - show_new_post_notifs, - email_verified, - accepted_application, - ); - - impl ToSafeSettings for LocalUser { - type SafeSettingsColumns = Columns; - - /// Includes everything but the hashed password - fn safe_settings_columns_tuple() -> Self::SafeSettingsColumns { - ( - id, - person_id, - email, - show_nsfw, - theme, - default_sort_type, - default_listing_type, - interface_language, - show_avatars, - send_notifications_to_email, - validator_time, - show_bot_accounts, - show_scores, - show_read_posts, - show_new_post_notifs, - email_verified, - accepted_application, - ) - } - } -} - impl LocalUser { pub async fn update_password( pool: &DbPool,