feat: wire as-of date into organization and seatmap views

This commit is contained in:
hyunho
2026-03-30 09:32:06 +09:00
parent 6e55b99e9a
commit b735a4cdd1
4 changed files with 73 additions and 9 deletions

View File

@@ -4308,8 +4308,8 @@ def get_seat_layout(seat_map_id: int, as_of: str | None = None) -> dict[str, obj
@app.get("/api/seat-maps/{seat_map_id}/viewer")
def get_seat_map_viewer(seat_map_id: int) -> HTMLResponse:
layout = fetch_seat_layout(seat_map_id)
def get_seat_map_viewer(seat_map_id: int, as_of: str | None = None) -> HTMLResponse:
layout = fetch_seat_layout(seat_map_id, parse_as_of(as_of))
seat_map = layout.get("seat_map") or {}
if seat_map.get("source_type") not in {"dxf", "fixed_html"}:
raise HTTPException(status_code=400, detail="Viewer is only available for supported seat maps.")