pub fn router(state: AdminState) -> RouterExpand description
Create the admin router with all endpoints and middleware.
§Endpoints
GET /health- Health checkPOST /v1/auth/login- LoginPOST /v1/auth/logout- LogoutGET /v1/auth/status- Auth statusGET /v1/config- Get configPUT /v1/config- Update configPOST /v1/execute- Execute queryGET /v1/metrics- System metricsGET /- Serve admin UI indexGET /assets/*path- Serve static assetsGET /*path- SPA fallback to index.html
§Middleware
Applied in order (outer to inner):
- Tracing - Logs requests and responses
- Concurrency limit - Prevents resource exhaustion