20 lines
456 B
Python
20 lines
456 B
Python
from fastapi import APIRouter, HTTPException
|
|
|
|
users = [] # In-memory storage
|
|
|
|
router = APIRouter()
|
|
|
|
@router.get("/users")
|
|
async def get_users():
|
|
"""Demo get users endpoint"""
|
|
if not users:
|
|
raise HTTPException(status_code=404, detail="No users found")
|
|
|
|
return {
|
|
"message": "Users retrieved successfully",
|
|
"users": users,
|
|
"features": {
|
|
"rate_limit": 100,
|
|
"expires_in": 3600
|
|
}
|
|
} |