feat: POST /speakers — resolves pipeline pause with speaker name mapping

This commit is contained in:
2026-04-02 01:07:41 +02:00
parent dbb35ce71d
commit 37e432f7fa
2 changed files with 32 additions and 0 deletions
+9
View File
@@ -288,6 +288,15 @@ async def settings_page_route(user: dict = Depends(current_user)):
return FileResponse(str(Path(__file__).parent.parent / "frontend" / "settings.html"))
@router.post("/speakers")
async def post_speakers(body: dict, user: dict = Depends(current_user)):
if state._speakers_event is None:
raise HTTPException(status_code=409, detail="Keine ausstehende Sprecher-Zuordnung")
state._speaker_names = {k: v for k, v in body.items() if isinstance(k, str)}
state._speakers_event.set()
return {"ok": True}
@router.websocket("/ws")
async def websocket_endpoint(ws: WebSocket):
from auth import get_user_for_token