feat: Update endpoint server-time
This commit is contained in:
parent
045ee4af3d
commit
135b0ffa5a
@ -1 +1,12 @@
|
|||||||
i can edit and save a new endpoint
|
from datetime import datetime
|
||||||
|
from fastapi import APIRouter
|
||||||
|
|
||||||
|
router = APIRouter()
|
||||||
|
|
||||||
|
@router.post("/server-time", response_model=dict)
|
||||||
|
async def get_server_time():
|
||||||
|
"""
|
||||||
|
Get the current server time
|
||||||
|
"""
|
||||||
|
current_time = datetime.now()
|
||||||
|
return {"server_time": current_time.isoformat()}
|
Loading…
x
Reference in New Issue
Block a user