diff --git a/PythonProject/api/teacher_api.py b/PythonProject/api/teacher_api.py index c35169c..95f2dad 100644 --- a/PythonProject/api/teacher_api.py +++ b/PythonProject/api/teacher_api.py @@ -33,7 +33,7 @@ def update_teacher1(t_id:int,teacher:Teacher_RequestModel,session=Depends(get_db r=update_teacher(id=t_id,req=d,session=session) if not r: raise HTTPException(status_code=500, detail='更新异常!') - return {'code':200,'detail':'cg'} + return {'code':200,'detail':'更新成功!','data':teacher} @teacher_api.delete("/teachers/{t_id}",tags=['教师基本信息管理模块'],summary='删除教师接口') @@ -41,4 +41,4 @@ def delete_teacher1(t_id:int,session=Depends(get_db)): r=delete_teacher(id=t_id,session=session) if not r: raise HTTPException(status_code=500,detail='删除异常!') - return {'code': 200, 'detail':'成功!'} \ No newline at end of file + return {'code': 200, 'detail':'删除成功!'} \ No newline at end of file