keycloak-collective-portal/keycloak_collective_portal/routes/root.py
decentral1se d22abd2bc5
All checks were successful
continuous-integration/drone/push Build is passing
The Big Refactor
Closes #3.
Closes #5.
Closes #7.
Closes #4.
Closes #2.
2021-06-13 12:20:16 +02:00

22 lines
511 B
Python

"""Home routes."""
from fastapi import APIRouter, Depends, Request
from keycloak_collective_portal.dependencies import (
get_invites,
get_user,
logged_in,
)
router = APIRouter()
@router.get("/", dependencies=[Depends(logged_in)])
async def home(
request: Request, user=Depends(get_user), invites=Depends(get_invites)
):
context = {"request": request, "user": user, "invites": invites}
return request.app.state.templates.TemplateResponse(
"admin.html", context=context
)