diff --git a/app/main.py b/app/main.py index ded601c..68ca986 100644 --- a/app/main.py +++ b/app/main.py @@ -14,6 +14,7 @@ from . import db from .config import settings from .generator import generation_exhausted, run_generation, today_local from .templates import CSS, PAGE_TEMPLATE +from .trmnl import trmnl_endpoint logging.basicConfig( level=logging.INFO, @@ -134,6 +135,12 @@ def index(): ) +@app.get("/trmnl.json") +def trmnl(request: Request): + """JSON feed for TRMNL e-ink devices (polling strategy).""" + return trmnl_endpoint(request) + + @app.get("/health") def health(): today = today_local()