This commit is contained in:
aaron 2026-04-20 21:21:44 +08:00
parent e94f23daba
commit 32cd7c5f8c

View File

@ -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")