2023-09-08 19:33:43 +00:00
|
|
|
from fastapi import APIRouter, Depends
|
2022-11-15 23:43:13 +00:00
|
|
|
|
2023-09-08 19:33:43 +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
|