From 974fe7c965b01e71a9b3057a26014407965816ff Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 19 Oct 2024 07:33:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20user.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/endpoints/user.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/endpoints/user.py b/app/api/endpoints/user.py index d1d6d6f02..53b9cf792 100644 --- a/app/api/endpoints/user.py +++ b/app/api/endpoints/user.py @@ -174,7 +174,7 @@ def set_config(key: str, value: Union[list, dict, bool, int, str] = None, @router.delete("/id/{user_id}", summary="删除用户", response_model=schemas.Response) -def delete_user_from_user_id( +def delete_user_by_id( *, db: Session = Depends(get_db), user_id: int, @@ -191,7 +191,7 @@ def delete_user_from_user_id( @router.delete("/name/{user_name}", summary="删除用户", response_model=schemas.Response) -def delete_user_from_user_id( +def delete_user_by_name( *, db: Session = Depends(get_db), user_name: str, @@ -208,7 +208,7 @@ def delete_user_from_user_id( @router.get("/{username}", summary="用户详情", response_model=schemas.User) -def read_user_by_id( +def read_user_by_name( username: str, current_user: User = Depends(get_current_active_user), db: Session = Depends(get_db),