From f87aaa7ead33fbf611d391720064578fa66f3be9 Mon Sep 17 00:00:00 2001 From: bruno Date: Fri, 10 Jul 2026 14:13:08 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20500=20on=20/pages/{id}=20=E2=80=94=20mis?= =?UTF-8?q?sing=20page=5Fdata=20in=20dashboard.py=20context?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same pattern as f7d9d91: dashboard.router is registered before board.router in main.py, so its /pages/{id} takes priority. Added page_data dict to match the new JSON script tag approach. --- app/routers/dashboard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/routers/dashboard.py b/app/routers/dashboard.py index 30243fa..58e9e46 100644 --- a/app/routers/dashboard.py +++ b/app/routers/dashboard.py @@ -169,7 +169,8 @@ async def view_page_root(request: Request, page_id: int): ctx = {**sidebar, "page": page, "sub_pages": [dict(s) for s in subs], "page_favorited": False, "page_share_mode": page.get("share_mode", "private"), - "page_published": bool(page.get("published", 0))} + "page_published": bool(page.get("published", 0)), + "page_data": {"id": page_id, "title": page.get("title"), "content_format": page.get("content_format", "blocks"), "content": page.get("content", ""), "favorited": False, "share_mode": page.get("share_mode", "private"), "published": bool(page.get("published", 0))}} template = env.get_template("page_editor.html") response = template.render(**ctx) return HTMLResponse(content=response, headers={"Cache-Control": "no-store, max-age=0"})