mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-12-26 22:23:02 +00:00
12 lines
234 B
Python
12 lines
234 B
Python
from fastapi import APIRouter, Depends
|
|
|
|
from ._security import require_admin
|
|
|
|
router = APIRouter(prefix="/user", tags=["user"])
|
|
|
|
|
|
@router.get("/admin")
|
|
def check_admin(
|
|
_: None = Depends(require_admin),
|
|
) -> bool:
|
|
return True
|