From 32cd7c5f8c99a4d5a450fdda43cf86942daf1f13 Mon Sep 17 00:00:00 2001 From: aaron <> Date: Mon, 20 Apr 2026 21:21:44 +0800 Subject: [PATCH] 1 --- backend/app/api/timeline.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/backend/app/api/timeline.py b/backend/app/api/timeline.py index e49dccd..a03f653 100644 --- a/backend/app/api/timeline.py +++ b/backend/app/api/timeline.py @@ -115,7 +115,20 @@ async def create_new_timeline( image_urls = await asyncio.gather(*[_upload_one(f) for f in files]) await add_images_to_timeline(db, post, image_urls) - return _build_timeline_out(post, user.id) + return TimelineOut( + id=post.id, + class_id=post.class_id, + author_id=post.author_id, + author_name=user.name, + title=post.title, + content=post.content, + image_urls=image_urls, + like_count=0, + has_liked=False, + comment_count=0, + created_at=post.created_at, + updated_at=post.updated_at, + ) @router.post("/{post_id}/images")