From fd9e526b819c646e9fbf5170045688b05894b0fc Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Fri, 15 May 2026 15:44:59 +0200 Subject: [PATCH] =?UTF-8?q?fix(search):=20use=20to=5Fthought=5Fresponse=20?= =?UTF-8?q?in=20search=20handler=20=E2=80=94=20was=20returning=20snake=5Fc?= =?UTF-8?q?ase=20partial=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/presentation/src/handlers/feed.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) 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?