添加statistics tag
This commit is contained in:
+3
-3
@@ -32,7 +32,7 @@ def list_score(
|
||||
return {"total": total, "data": data_list}
|
||||
|
||||
|
||||
@scores_router.put("{score_id}", summary="更新成绩接口")
|
||||
@scores_router.put("/{score_id}", summary="更新成绩接口")
|
||||
def modify_score(score_id: int, req: ScoreUpdate, db: Session = Depends(get_db)):
|
||||
update_dict = req.model_dump(exclude_unset=True)
|
||||
if not update_dict:
|
||||
@@ -43,9 +43,9 @@ def modify_score(score_id: int, req: ScoreUpdate, db: Session = Depends(get_db))
|
||||
return {"msg": "修改成功"}
|
||||
|
||||
|
||||
@scores_router.delete("{score_id}", summary="删除成绩接口")
|
||||
@scores_router.delete("/{score_id}", summary="删除成绩接口")
|
||||
def remove_score(score_id: int, db: Session = Depends(get_db)):
|
||||
ok = delete_score_dao(score_id, db)
|
||||
if not ok:
|
||||
raise HTTPException(status_code=400, detail="删除失败,记录不存在或已删除")
|
||||
return {"msg": "逻辑删除成功"}
|
||||
return {"msg": "逻辑删除成功"}
|
||||
|
||||
Reference in New Issue
Block a user