cdn

Log | Files | Refs | Activity

commit 0cd0c89babd48dfb9295c9f4d0c73c72f7b71abb
parent eb40c9c5738b4afb430a0b109f771c1f232b3a5e
Author: Amit Dutta <mail@amit.is-a.dev>
Date:   Thu,  3 Sep 2026 15:26:15 +0530

Merge pull request #2 from notamitgamer/fix/template-response-signature

Fix TemplateResponse signature crash on newer Starlette
Diffstat:
Mapp/main.py | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/app/main.py b/app/main.py @@ -119,15 +119,14 @@ async def serve(request: Request, path: str): clean_path = path.strip("/") if clean_path == "upload": - return templates.TemplateResponse("index.html", {"request": request, "page": "upload"}) + return templates.TemplateResponse(request, "index.html", {"page": "upload"}) if clean_path == "ytmusic": - return templates.TemplateResponse("index.html", {"request": request, "page": "ytmusic"}) + return templates.TemplateResponse(request, "index.html", {"page": "ytmusic"}) # Phase 1/2: UI Rendering (File vs Directory logic) if clean_path and await is_file(clean_path): filename = clean_path.split("/")[-1] - return templates.TemplateResponse("index.html", { - "request": request, + return templates.TemplateResponse(request, "index.html", { "page": "file", "path": clean_path, "filename": filename @@ -137,8 +136,7 @@ async def serve(request: Request, path: str): if clean_path and not items: raise HTTPException(status_code=404, detail="Not Found") - return templates.TemplateResponse("index.html", { - "request": request, + return templates.TemplateResponse(request, "index.html", { "page": "listing", "path": clean_path, "items": items
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror