From b0987e57c14e574f5e9b97c741bbe5b6987e77c1 Mon Sep 17 00:00:00 2001 From: TylerCG <117808427+TylerCG@users.noreply.github.com> Date: Sun, 27 Apr 2025 20:50:45 -0400 Subject: [PATCH] Update main.py --- app/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index d6da3b8..c79a1b5 100644 --- a/app/main.py +++ b/app/main.py @@ -123,7 +123,10 @@ async def webpage(request: Request): @app.get("/dropout", include_in_schema=False) async def webpage(request: Request): + global cached_data + if cached_data is None: + await dropoutUpdate() try: - return templates.TemplateResponse("dropout.html", {"request": request, "shows": shows()}) + return templates.TemplateResponse("dropout.html", {"request": request, "shows": await shows()}) except Exception as e: return JSONResponse(status_code=500, content={"status": "error", "message": str(e)})