File size: 320 Bytes
b4929ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from datetime import datetime, timezone

from fastapi import APIRouter

router = APIRouter(tags=["health"])


@router.get("/")
async def health():
    utc_now = datetime.now(timezone.utc).isoformat()
    return {
        "code": 0,
        "msg": "ok",
        "data": {
            "utc_now": utc_now,
        },
    }