Spaces:
Sleeping
Sleeping
| from fastapi import APIRouter , Depends | |
| from app.routers.auth.system import get_current_user # Import our Auth System | |
| # Create the router for help/info endpoints | |
| router = APIRouter( | |
| prefix="/help", | |
| tags=["Information"] | |
| ) | |
| def get_api_info(current_user: dict = Depends(get_current_user) ): | |
| """ | |
| Returns general information about the API and available endpoints. | |
| """ | |
| return { | |
| "requested_by": current_user.username, | |
| "api_name": "My Awesome FastAPI", | |
| "version": "1.0", | |
| "available_sections": ["/random", "/help"], | |
| "message": "Use the /docs endpoint for interactive API documentation." | |
| } |