feat: Update endpoint server-time
This commit is contained in:
parent
b304d5b819
commit
3f5213210f
@ -0,0 +1,12 @@
|
||||
from datetime import datetime
|
||||
from fastapi import APIRouter, Response
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.post("/server-time", status_code=200)
|
||||
async def get_server_time():
|
||||
"""
|
||||
Get the current server time
|
||||
"""
|
||||
now = datetime.utcnow()
|
||||
return Response(content=f"Server time: {now.isoformat()}", media_type="text/plain")
|
Loading…
x
Reference in New Issue
Block a user