21 lines
486 B
Python
21 lines
486 B
Python
from fastapi import APIRouter, HTTPException
|
|
|
|
users = [] # In-memory storage
|
|
|
|
router = APIRouter()
|
|
|
|
@router.get("/users")
|
|
async def get_users():
|
|
"""Get all users endpoint"""
|
|
if not users:
|
|
raise HTTPException(status_code=404, detail="No users found")
|
|
|
|
return {
|
|
"message": "Users retrieved successfully",
|
|
"users": users,
|
|
"count": len(users),
|
|
"features": {
|
|
"pagination": False,
|
|
"filtering": False
|
|
}
|
|
} |