advent22/api/advent22_api/routers/user.py

13 lines
234 B
Python
Raw Normal View History

from fastapi import APIRouter, Depends
2022-11-15 23:43:13 +00:00
from ._security import require_admin
2022-11-15 22:17:32 +00:00
router = APIRouter(prefix="/user", tags=["user"])
@router.get("/admin")
def check_admin(
_: None = Depends(require_admin),
2022-11-15 23:43:13 +00:00
) -> bool:
return True