import logging

from fastapi import APIRouter, Request
from fastapi.responses import HTMLResponse
from fastapi.templating import Jinja2Templates

logger = logging.getLogger(__name__)
router = APIRouter()
templates = Jinja2Templates(directory="app")


@router.get("/links", response_class=HTMLResponse)
async def links_index(request: Request):
    return templates.TemplateResponse(
        "modules/links/templates/index.html",
        {"request": request},
    )
