From 8669a33916fccad28bc9e4c5d181ac73c9228825 Mon Sep 17 00:00:00 2001 From: 00MSJ1122 <1253313142@qq.com> Date: Mon, 21 Sep 2026 20:01:42 +0800 Subject: [PATCH] 1 --- PythonProject/api/student_api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PythonProject/api/student_api.py b/PythonProject/api/student_api.py index 050991a..7ff2fe1 100644 --- a/PythonProject/api/student_api.py +++ b/PythonProject/api/student_api.py @@ -6,7 +6,7 @@ from util.database import get_db StudentAPI = APIRouter() -@StudentAPI.get('/',response_model=list[StudentPageResponse],tags=['学⽣基本信息管理模块'],description='查询学生信息') +@StudentAPI.get('/students',response_model=list[StudentPageResponse],tags=['学⽣基本信息管理模块'],description='查询学生信息') def get_students(stu_id:int|None=None ,stu_name:str|None=None ,class_id:int|None=None @@ -49,7 +49,7 @@ def del_students(stu_id:int raise HTTPException(status_code=500,detail='没有删除') return {'code':200,'totals':rows,'detail':'删除成功'} -@StudentAPI.post('/',tags=['学⽣基本信息管理模块'],response_model=StugetResponse) +@StudentAPI.post('/students',tags=['学⽣基本信息管理模块'],response_model=StugetResponse) def add_students(s:StudentRequest ,db=Depends(get_db)): d=s.model_dump(exclude_unset=False) @@ -59,7 +59,7 @@ def add_students(s:StudentRequest return stu_new -@StudentAPI.put('/',tags=['学⽣基本信息管理模块']) +@StudentAPI.put('/students',tags=['学⽣基本信息管理模块']) def get_students(stu_id:int|None = None ,stu_name:str|None = None ,class_id:int|None=None