From e222a93204508a3b40a6063e805e76433e64ce8f Mon Sep 17 00:00:00 2001 From: fish Date: Sun, 26 Jul 2026 10:37:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=93=E4=BD=8D=E7=AE=A1=E7=90=86=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=88=A0=E9=99=A4=E8=BD=AE=E6=AC=A1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- ft-app/app/routers/positions.py | 9 +++++++++ ft-app/app/templates/positions.html | 3 +++ 2 files changed, 12 insertions(+) diff --git a/ft-app/app/routers/positions.py b/ft-app/app/routers/positions.py index c536032..0df0beb 100644 --- a/ft-app/app/routers/positions.py +++ b/ft-app/app/routers/positions.py @@ -120,3 +120,12 @@ def close_round( r.status = result db.commit() return RedirectResponse("/positions/", status_code=303) + + +@router.post("/{round_id}/delete") +def delete_round(round_id: int, db: Session = Depends(get_db)): + r = db.query(Round).filter(Round.id == round_id).first() + if r: + db.delete(r) + db.commit() + return RedirectResponse("/positions/", status_code=303) diff --git a/ft-app/app/templates/positions.html b/ft-app/app/templates/positions.html index b88e375..0969926 100644 --- a/ft-app/app/templates/positions.html +++ b/ft-app/app/templates/positions.html @@ -65,6 +65,9 @@ +
+ +