This commit is contained in:
team3
2026-09-16 13:21:50 +02:00
parent 90fffbe077
commit a639e40a23
3 changed files with 347 additions and 25 deletions

View File

@@ -541,12 +541,13 @@ def bewerten(
watched_id: int,
response: Response,
stars: int = Body(..., embed=True),
text: str | None = Body(None, embed=True),
filmabend_sid: str | None = Cookie(None),
):
sid = sitzung(response, filmabend_sid)
stars = max(1, min(watched.MAX_STERNE, stars))
# Der Name kommt aus der Runde, nicht aus der Anfrage
eintrag = watched.bewerten(watched_id, sid, stars, users.name_von(sid))
eintrag = watched.bewerten(watched_id, sid, stars, users.name_von(sid), text)
if not eintrag:
raise HTTPException(status_code=404, detail="Film steht nicht in der Liste")
events.senden("watched")