(Admin) Returns a snapshot of the current in-memory usage database. Requires a valid X-Admin-Key header.
(is_admin: bool = Depends(get_admin_access))
| 59 | |
| 60 | @tools_router.get("/tools/usage", tags=["Admin"], summary="Get all current usage data") |
| 61 | async def get_all_usage(is_admin: bool = Depends(get_admin_access)): |
| 62 | """ |
| 63 | (Admin) Returns a snapshot of the current in-memory usage database. |
| 64 | Requires a valid X-Admin-Key header. |
| 65 | """ |
| 66 | # The dependency already handled the security check. |
| 67 | # If the code reaches here, 'is_admin' is True. |
| 68 | return await get_all_usage_data() |
| 69 | |
| 70 | |
| 71 | @tools_router.post("/tools/send-email", tags=["Tools"]) |
nothing calls this directly
no test coverage detected