Update code in endpoints/api/v1/endpoint.get.py
This commit is contained in:
parent
d206198023
commit
0183fa43fc
41
endpoints/api/v1/endpoint.get.py
Normal file
41
endpoints/api/v1/endpoint.get.py
Normal file
@ -0,0 +1,41 @@
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from core.database import fake_users_db
|
||||
from typing import Dict, List
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.get("/api/v1/endpoint")
|
||||
async def get_dummy_data():
|
||||
"""Get dummy data endpoint"""
|
||||
|
||||
dummy_data = {
|
||||
"users": [
|
||||
{
|
||||
"id": "001",
|
||||
"name": "John Doe",
|
||||
"email": "john@example.com",
|
||||
"role": "user"
|
||||
},
|
||||
{
|
||||
"id": "002",
|
||||
"name": "Jane Smith",
|
||||
"email": "jane@example.com",
|
||||
"role": "admin"
|
||||
}
|
||||
],
|
||||
"stats": {
|
||||
"total_users": 2,
|
||||
"active_users": 1,
|
||||
"last_updated": "2024-01-01T00:00:00Z"
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
"message": "Data retrieved successfully",
|
||||
"data": dummy_data,
|
||||
"metadata": {
|
||||
"source": "demo_database",
|
||||
"version": "1.0",
|
||||
"timestamp": "2024-01-01T00:00:00Z"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user