改buge
This commit is contained in:
@@ -9,7 +9,7 @@ from Teachers.schema.tea_response import TeaResponse
|
||||
tea_api = APIRouter(tags=['老师相关接口'])
|
||||
|
||||
@tea_api.post('/tea',response_model=TeaResponse,summary='新增老师',description='输入新增的老师信息,除去姓名外可以为空')
|
||||
def add_tea(tea: TeaRequest,db=Depends(get_db)):
|
||||
def add_tea(tea: NewTeaRequest,db=Depends(get_db)):
|
||||
r = add_tea_dao(tea.model_dump(),db)
|
||||
if not r:
|
||||
raise HTTPException(status_code=500,detail='添加失败!')
|
||||
|
||||
Reference in New Issue
Block a user