File size: 639 Bytes
f1c3ff2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""FastAPI routes for product version / About (GET /api/about, GET /api/version)."""

from __future__ import annotations

from typing import Any, Dict

from fastapi import APIRouter

from sensorflow.about.catalog import get_about, get_version

router = APIRouter(prefix="/api", tags=["about"])


@router.get("/about")
def about_payload() -> Dict[str, Any]:
    """Product name, current version, links, and chronological release notes."""
    return get_about()


@router.get("/version")
def version_payload() -> Dict[str, Any]:
    """Current version plus the release list (for help chat / “what’s new”)."""
    return get_version()