5d60d33db1
Volledige Foodlinkk Command Center uitbreiding met social automatisering, reclamefolder filters, Proxmox monitoring en documentatie.
22 lines
648 B
Python
22 lines
648 B
Python
from fastapi import APIRouter, Request
|
|
from fastapi.templating import Jinja2Templates
|
|
from pathlib import Path
|
|
|
|
router = APIRouter(tags=["settings"])
|
|
|
|
BASE_DIR = Path(__file__).resolve().parent.parent.parent
|
|
templates = Jinja2Templates(directory=str(BASE_DIR / "templates"))
|
|
|
|
|
|
@router.get("/settings")
|
|
async def settings_page(request: Request, tab: str = "email"):
|
|
allowed = ("email", "general", "permissions", "social")
|
|
return templates.TemplateResponse(
|
|
"settings.html",
|
|
{
|
|
"request": request,
|
|
"page_title": "Settings",
|
|
"active_tab": tab if tab in allowed else "email",
|
|
},
|
|
)
|