mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-11-23 08:13:01 +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
|