diff --git a/crates/presentation/src/handlers/feed.rs b/crates/presentation/src/handlers/feed.rs index 52ab4b9..3a03c9f 100644 --- a/crates/presentation/src/handlers/feed.rs +++ b/crates/presentation/src/handlers/feed.rs @@ -109,18 +109,8 @@ pub async fn search_handler( let thoughts = thoughts_result? .items - .into_iter() - .map(|e| { - 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, - }) - }) + .iter() + .map(to_thought_response) .collect::>(); let users = users_result?