From a791022ff1311e1fb76930c398d6ff91036d0456 Mon Sep 17 00:00:00 2001 From: zhaoqingang <zhaoqg0118@163.com> Date: 星期三, 11 十二月 2024 17:57:52 +0800 Subject: [PATCH] 新增加标签功能 --- app/api/dialog.py | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/api/dialog.py b/app/api/dialog.py index c11b4fd..cb2b1e4 100644 --- a/app/api/dialog.py +++ b/app/api/dialog.py @@ -11,6 +11,13 @@ @dialog_router.get("/list", response_model=Response) -async def dialog_list(current_user: UserModel = Depends(get_current_user), +async def dialog_list(current: int, + pageSize: int, + keyword: str = "", + label: int =0, + status: str ="", + current_user: UserModel = Depends(get_current_user), db=Depends(get_db)): - return Response(code=200, msg="", data=await get_dialog_list(db, current_user.id)) + if current and not pageSize: + return ResponseList(code=400, msg="缂哄皯鍙傛暟") + return Response(code=200, msg="", data=await get_dialog_list(db, current_user.id, keyword, label, status, pageSize, current)) -- Gitblit v1.8.0