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
|