fix(thoughts): thought_to_json uses camelCase — POST/GET responses now match ThoughtSchema
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 9m33s
test / unit (pull_request) Successful in 16m22s
test / integration (pull_request) Failing after 17m18s

This commit is contained in:
2026-05-14 17:49:22 +02:00
parent 68261c4b2b
commit c67371231e

View File

@@ -31,15 +31,17 @@ fn thought_to_json(
"id": t.id.as_uuid(), "id": t.id.as_uuid(),
"content": t.content.as_str(), "content": t.content.as_str(),
"author": to_user_response(author), "author": to_user_response(author),
"in_reply_to_id": t.in_reply_to_id.as_ref().map(|x| x.as_uuid()), "replyToId": t.in_reply_to_id.as_ref().map(|x| x.as_uuid()),
"visibility": t.visibility.as_str(), "visibility": t.visibility.as_str(),
"content_warning": t.content_warning, "contentWarning": t.content_warning,
"sensitive": t.sensitive, "sensitive": t.sensitive,
"like_count": like_count, "likeCount": like_count,
"boost_count": boost_count, "boostCount": boost_count,
"reply_count": reply_count, "replyCount": reply_count,
"created_at": t.created_at, "likedByViewer": false,
"updated_at": t.updated_at, "boostedByViewer": false,
"createdAt": t.created_at,
"updatedAt": t.updated_at,
}) })
} }