Update code in endpoints/users.get.py
This commit is contained in:
parent
a6631494a0
commit
e43ca07bc2
@ -0,0 +1,21 @@
|
|||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user