Skip to content

Commit

Permalink
feat: 上线助手技能列表默认返回全部
Browse files Browse the repository at this point in the history
  • Loading branch information
zgqgit committed Jun 17, 2024
1 parent 60a6c08 commit 1888564
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/backend/bisheng/api/v1/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ def get_chatlist_list(*,
status_code=200)
def get_online_chat(*,
keyword: Optional[str] = None,
page: Optional[int] = 1,
limit: Optional[int] = 10,
page: Optional[int] = 0,
limit: Optional[int] = 0,
Authorize: AuthJWT = Depends()):
Authorize.jwt_required()
payload = json.loads(Authorize.get_jwt_subject())
Expand Down Expand Up @@ -200,7 +200,9 @@ def get_online_chat(*,
update_time=one.update_time,
flow_type='flow'))
res.sort(key=lambda x: x.update_time, reverse=True)
return resp_200(data=res[(page - 1) * limit:page * limit])
if page and limit:
res = res[(page - 1) * limit:page * limit]
return resp_200(data=res)


@router.websocket('/chat/{flow_id}')
Expand Down

0 comments on commit 1888564

Please sign in to comment.