26 lines
599 B
Python
26 lines
599 B
Python
from fastapi import APIRouter, Request
|
|
from fastapi.responses import HTMLResponse
|
|
from fastapi.templating import Jinja2Templates
|
|
|
|
from config import get_settings
|
|
|
|
router = APIRouter(tags=["pages"])
|
|
templates = Jinja2Templates(directory="templates")
|
|
|
|
|
|
@router.get("/", response_class=HTMLResponse)
|
|
async def landing(request: Request):
|
|
settings = get_settings()
|
|
return templates.TemplateResponse(
|
|
"index.html",
|
|
{
|
|
"request": request,
|
|
"brand": settings.brand_name,
|
|
},
|
|
)
|
|
|
|
|
|
@router.get("/health")
|
|
async def health():
|
|
return {"status": "ok"}
|