pub fn update_user_display_name(
        current_user_name: String,
        new_display_name: String,
        conn: &PgConnection,
    ) -> BackendResult<User> {
        use crate::schema::users::dsl::*;

        let target = users.filter(user_name.eq(current_user_name));

        info!("Updating user display name");
        diesel::update(target)
            .set(display_name.eq(new_display_name))
            .get_result(conn)
            .map_err(handle_err::<User>)
    }
/// Updates the user's display name.
Updates the user's display name.
Updates the user ' s display name .
pub fn update_user_display_name(
        current_user_name: String,
        new_display_name: String,
        conn: &PgConnection,
    ) -> BackendResult<User> {
        use crate::schema::users::dsl::*;
        let target = users.filter(user_name.eq(current_user_name));
        info!("Updating user display name");
        diesel::update(target)
            .set(display_name.eq(new_display_name))
            .get_result(conn)
            .map_err(handle_err::<User>)
    }
pub fn update_user_display_name ( current_user_name : String , new_display_name : String , conn : & PgConnection , ) -> BackendResult < User > { use crate :: schema :: users :: dsl :: * ; let target = users . filter ( user_name . eq ( current_user_name ) ) ; info ! ( " " ) ; diesel :: update ( target ) . set ( display_name . eq ( new_display_name ) ) . get_result ( conn ) . map_err ( handle_err :: < User > ) }
Updates the user's display name.
Updates the user ' s display name .
current_user_name
String
new_display_name
String
conn
&PgConnection
current_user_name
String
new_display_name
String
conn
&PgConnection