feat: v2 rewrite — hexagonal arch, ActivityPub federation, NATS, deployment-ready #1
@@ -109,18 +109,8 @@ pub async fn search_handler(
|
|||||||
|
|
||||||
let thoughts = thoughts_result?
|
let thoughts = thoughts_result?
|
||||||
.items
|
.items
|
||||||
.into_iter()
|
.iter()
|
||||||
.map(|e| {
|
.map(to_thought_response)
|
||||||
serde_json::json!({
|
|
||||||
"id": e.thought.id.as_uuid(),
|
|
||||||
"content": e.thought.content.as_str(),
|
|
||||||
"author": to_user_response(&e.author),
|
|
||||||
"like_count": e.stats.like_count,
|
|
||||||
"boost_count": e.stats.boost_count,
|
|
||||||
"reply_count": e.stats.reply_count,
|
|
||||||
"created_at": e.thought.created_at,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
let users = users_result?
|
let users = users_result?
|
||||||
|
|||||||
Reference in New Issue
Block a user