Update code in endpoints/api/v1/endpoint.post.py
This commit is contained in:
parent
0204246cd3
commit
6bc5e38552
21
endpoints/api/v1/endpoint.post.py
Normal file
21
endpoints/api/v1/endpoint.post.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
from fastapi import APIRouter, Depends, HTTPException
|
||||||
|
from core.database import fake_users_db
|
||||||
|
|
||||||
|
router = APIRouter()
|
||||||
|
|
||||||
|
@router.post("/api/v1/endpoint")
|
||||||
|
async def endpoint_handler(
|
||||||
|
message: str = "Hello"
|
||||||
|
):
|
||||||
|
"""Demo greeting endpoint"""
|
||||||
|
return {
|
||||||
|
"message": "Greeting received successfully",
|
||||||
|
"data": {
|
||||||
|
"greeting": message,
|
||||||
|
"timestamp": "2024-01-01T00:00:00Z"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"status": "success",
|
||||||
|
"version": "1.0"
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user