File size: 724 Bytes
0127c21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
GET /api/health

Simple liveness endpoint used to verify the frontend <-> backend
connection during Milestone 1. Expand later with subsystem checks
(model registry loaded? GDAL available?) but keep it fast and boring —
this gets polled by the UI status dot.
"""
from datetime import datetime, timezone

from fastapi import APIRouter
from pydantic import BaseModel

router = APIRouter()


class HealthResponse(BaseModel):
    status: str
    service: str
    timestamp: str


@router.get("/health", response_model=HealthResponse)
def health_check() -> HealthResponse:
    return HealthResponse(
        status="ok",
        service="satquery-ai-backend",
        timestamp=datetime.now(timezone.utc).isoformat(),
    )