diff --git a/app/main.py b/app/main.py index 1b7a470..03627e6 100644 --- a/app/main.py +++ b/app/main.py @@ -1,7 +1,6 @@ import asyncio import logging from contextlib import asynccontextmanager -from pathlib import Path from fastapi import FastAPI, Request, status from fastapi.responses import FileResponse, JSONResponse @@ -21,7 +20,7 @@ from app.api.routes.rounds import router as rounds_router from app.api.routes.users import router as users_router from app.api.routes.withdrawals import router as withdrawals_router from app.auth.routes import router as auth_router -from app.api.errors import ApiError, http_error +from app.api.errors import ApiError from app.config import settings, validate_runtime_secrets from app.db.base import AsyncSessionLocal from app.electrum.client import ElectrumClient, ElectrumEndpoint, parse_endpoints @@ -119,22 +118,14 @@ async def admin_panel() -> FileResponse: return FileResponse("app/static/admin.html", headers=_NO_STORE_HEADERS) -_USER_GUIDE_PATH = Path("docs/guida-utente.md") - - @app.get("/guida", include_in_schema=False) async def user_guide() -> FileResponse: - """Serves docs/guida-utente.md as plain text so it opens inline in the - browser (no markdown rendering — keeps this simple), linked from the - navbar's help button in app/static/index.html. + return FileResponse("app/static/guida.html", headers=_NO_STORE_HEADERS) - The Dockerfile must COPY docs/ for this to exist inside the container (it - didn't, which made this a guaranteed 500 in every real deployment — B-16). - Answers a clean 404 if the file is missing rather than an unhandled error.""" - if not _USER_GUIDE_PATH.is_file(): - logger.error("user guide missing at %s (is docs/ shipped in the image?)", _USER_GUIDE_PATH) - raise http_error(status.HTTP_404_NOT_FOUND, "guide_unavailable", "user guide not available") - return FileResponse(_USER_GUIDE_PATH, media_type="text/plain; charset=utf-8") + +@app.get("/report-bug", include_in_schema=False) +async def report_bug_page() -> FileResponse: + return FileResponse("app/static/report-bug.html", headers=_NO_STORE_HEADERS) app.mount("/", StaticFiles(directory="app/static", html=True), name="static") diff --git a/app/static/guida.html b/app/static/guida.html new file mode 100644 index 0000000..e6d986f --- /dev/null +++ b/app/static/guida.html @@ -0,0 +1,16 @@ + + + + + + Guida — PLM Lottery + + + +
+

Guida utente

+

Questa pagina è un placeholder. La guida completa sarà pubblicata qui a breve.

+

← Torna alla home

+
+ + diff --git a/app/static/index.html b/app/static/index.html index ceb9b39..666fe64 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -25,8 +25,8 @@ - - + +