diff --git a/PythonProject/api/student_api.py b/PythonProject/api/student_api.py index 59bd97f..b39f4b4 100644 --- a/PythonProject/api/student_api.py +++ b/PythonProject/api/student_api.py @@ -52,7 +52,7 @@ def update_students(stu_id:int raise HTTPException(status_code=404, detail='学生不存在或已被删除,更新失败') return {'code':200,'totals':r,'detail':'更新成功'} -@StudentAPI.delete('/students/{stu_id}',response_model= StugetResponse,summary='学生信息删除接口',description='删除学生信息') +@StudentAPI.delete('/students/{stu_id}',response_model= StudelResponse,summary='学生信息删除接口',description='删除学生信息') def del_students(stu_id:int ,db=Depends(get_db)): rows=delete_student_dao( stu_id=stu_id,db=db ) diff --git a/PythonProject/schema/student_schema.py b/PythonProject/schema/student_schema.py index 208c576..540b2d6 100644 --- a/PythonProject/schema/student_schema.py +++ b/PythonProject/schema/student_schema.py @@ -99,4 +99,10 @@ class StuPageResponse(BaseModel): totals: int data: List[StugetResponse] +class StudelResponse(BaseModel): + code: int = 200 + detail: str = "ok" + totals: int + +