Merge branch 'develop' into di

# Conflicts:
#	app/main.py
#	app/services/vcs.py
#	config/config.yaml
This commit is contained in:
Piotr Dec 2025-10-16 00:13:38 +02:00
commit 1eab4cd6fc
Signed by: stawros
GPG key ID: 74B18A3F0F1E99C0
10 changed files with 162 additions and 44 deletions

20
app/core/router.py Normal file
View file

@ -0,0 +1,20 @@
from fastapi import APIRouter, Request
from fastapi.responses import HTMLResponse
from jinja2 import Environment, FileSystemLoader, select_autoescape
router = APIRouter()
# Inicjalizacja Jinja2
templates_env = Environment(
loader=FileSystemLoader("app/templates"),
autoescape=select_autoescape(["html", "xml"]),
)
# Przykładowy endpoint HTML
@router.get("/", response_class=HTMLResponse)
async def index(request: Request) -> HTMLResponse:
template = templates_env.get_template("index.html")
html = template.render(title="Strona główna", request=request)
return HTMLResponse(content=html)