13 lines
321 B
Python
13 lines
321 B
Python
from pathlib import Path
|
|
|
|
from fastapi import APIRouter
|
|
from fastapi.responses import HTMLResponse
|
|
|
|
router = APIRouter()
|
|
DASHBOARD_FILE = Path(__file__).resolve().parent.parent / "frontend" / "index.html"
|
|
|
|
|
|
@router.get("/", response_class=HTMLResponse)
|
|
async def dashboard() -> str:
|
|
return DASHBOARD_FILE.read_text()
|