fix: rename uid to uuid in AFWebUser struct for clarity

This commit is contained in:
khorshuheng 2024-07-29 16:04:54 +08:00
parent 422683d717
commit 230358fd2f
2 changed files with 4 additions and 4 deletions

View File

@ -851,7 +851,7 @@ pub struct GlobalComments {
#[derive(Serialize, Deserialize, Debug, Clone)] #[derive(Serialize, Deserialize, Debug, Clone)]
pub struct AFWebUser { pub struct AFWebUser {
pub uid: Uuid, pub uuid: Uuid,
pub name: String, pub name: String,
pub avatar_url: Option<String>, pub avatar_url: Option<String>,
} }

View File

@ -1150,7 +1150,7 @@ pub async fn select_comments_for_published_view_orderd_by_recency<
.iter() .iter()
.map(|row| { .map(|row| {
let comment_creator = row.user_uuid.map(|uuid| AFWebUser { let comment_creator = row.user_uuid.map(|uuid| AFWebUser {
uid: uuid, uuid,
name: row name: row
.user_name .user_name
.as_ref() .as_ref()
@ -1268,7 +1268,7 @@ pub async fn select_reactions_for_published_view_ordered_by_reaction_type_creati
.users .users
.iter() .iter()
.map(|u| AFWebUser { .map(|u| AFWebUser {
uid: u.uuid, uuid: u.uuid,
name: u.name.clone(), name: u.name.clone(),
avatar_url: None, avatar_url: None,
}) })
@ -1312,7 +1312,7 @@ pub async fn select_reactions_for_comment_ordered_by_reaction_type_creation_time
.users .users
.iter() .iter()
.map(|u| AFWebUser { .map(|u| AFWebUser {
uid: u.uuid, uuid: u.uuid,
name: u.name.clone(), name: u.name.clone(),
avatar_url: None, avatar_url: None,
}) })