feat: add author display name to thought schemas and update related components

This commit is contained in:
2025-09-07 22:54:34 +02:00
parent 2083f3bb16
commit 9b2a1139b5
7 changed files with 25 additions and 12 deletions

View File

@@ -38,6 +38,7 @@ pub async fn search_thoughts(
// We must join with the user table to get the author's username
let thoughts_with_authors = thought::Entity::find()
.column_as(user::Column::Username, "author_username")
.column_as(user::Column::DisplayName, "author_display_name")
.join(JoinType::InnerJoin, thought::Relation::User.def())
.filter(Expr::cust_with_values(
"thought.search_document @@ websearch_to_tsquery('english', $1)",