fix(chat): 聊天消息预览查询条件缺失
This commit is contained in:
@@ -34,7 +34,7 @@ chat_router = APIRouter(prefix='/chat', tags=['聊天模块'])
|
||||
@chat_router.get(
|
||||
'/all/', summary='获取所有聊天',
|
||||
response_model=base_schema.BaseResponse[
|
||||
base_schema.PaginatedCursor[
|
||||
base_schema.Paginated[
|
||||
List[schema.ChatUnreadOut]
|
||||
]
|
||||
]
|
||||
@@ -83,7 +83,7 @@ async def get_all_chats(
|
||||
@chat_router.get(
|
||||
'/{chat_guid}/messages/', summary='获取单个聊天的历史消息',
|
||||
response_model=base_schema.BaseResponse[
|
||||
base_schema.PaginatedCursor[
|
||||
base_schema.Paginated[
|
||||
List[schema.MessageOut]
|
||||
]
|
||||
]
|
||||
@@ -135,7 +135,6 @@ async def get_single_chat_messages(
|
||||
return {
|
||||
'data': {
|
||||
'list': results,
|
||||
'cursor': results[-1].get('id'),
|
||||
'next_page': (page * page_size) < total,
|
||||
'total': total,
|
||||
'page': page,
|
||||
|
||||
Reference in New Issue
Block a user