1
This commit is contained in:
parent
e94f23daba
commit
32cd7c5f8c
@ -115,7 +115,20 @@ async def create_new_timeline(
|
|||||||
image_urls = await asyncio.gather(*[_upload_one(f) for f in files])
|
image_urls = await asyncio.gather(*[_upload_one(f) for f in files])
|
||||||
await add_images_to_timeline(db, post, image_urls)
|
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")
|
@router.post("/{post_id}/images")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user