22 lines
478 B
Python
22 lines
478 B
Python
"""Povinné meta endpointy: /health a /version."""
|
|
from fastapi import APIRouter
|
|
|
|
from ..config import APP_NAME, APP_VERSION, ROOT_PATH
|
|
|
|
router = APIRouter(tags=["meta"])
|
|
|
|
|
|
@router.get("/health", summary="Health check")
|
|
def health():
|
|
return {"status": "ok"}
|
|
|
|
|
|
@router.get("/version", summary="Verze a runtime informace")
|
|
def version():
|
|
return {
|
|
"app": APP_NAME,
|
|
"version": APP_VERSION,
|
|
"language": "python",
|
|
"root_path": ROOT_PATH,
|
|
}
|