改bug
This commit is contained in:
@@ -34,3 +34,13 @@ def update_tea(id:int,tea:NewTeaRequest,db=Depends(get_db)):
|
||||
if not r:
|
||||
raise HTTPException(status_code=404,detail='老师不存在')
|
||||
return {'detail':'更新成功'}
|
||||
|
||||
#根据任意信息删除
|
||||
@tea_api.delete('/tea',summary='根据任意信息逻辑删除',description='输入任意信息删除')
|
||||
def delete_other_tea_dao1(t:TeaRequest,db=Depends(get_db)):
|
||||
row1 = delete_other_tea_dao(t.model_dump(exclude_unset=True),db)
|
||||
if not row1:
|
||||
raise HTTPException(status_code=404,detail='没有找到符合条件的老师')
|
||||
return{'code':200,'data':row1}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user