fix(search): use to_thought_response in search handler — was returning snake_case partial data
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m24s
test / unit (pull_request) Successful in 16m42s
test / integration (pull_request) Failing after 17m1s
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m24s
test / unit (pull_request) Successful in 16m42s
test / integration (pull_request) Failing after 17m1s
This commit is contained in:
@@ -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::<Vec<_>>();
|
||||
|
||||
let users = users_result?
|
||||
|
||||
Reference in New Issue
Block a user