rename project to fhdhview
This commit is contained in:
1 parent
c4d3b6b292
commit
6755875938
51 files changed
+39
-39
No files matched your search
@@ -0,0 +1,36 @@
|
||||
# SPDX-FileCopyrightText: 2026 Filmhuis Den Haag
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
from fastapi import APIRouter, status
|
||||
from pydantic import BaseModel
|
||||
|
||||
router = APIRouter(
|
||||
prefix="/health",
|
||||
tags=["Health"]
|
||||
)
|
||||
|
||||
|
||||
class HealthCheck(BaseModel):
|
||||
"""Response model to validate and return when performing a health check."""
|
||||
|
||||
status: str = "OK"
|
||||
|
||||
|
||||
@router.get(
|
||||
"/",
|
||||
summary="Perform a Health Check",
|
||||
response_description="Return HTTP Status Code 200 (OK)",
|
||||
status_code=status.HTTP_200_OK,
|
||||
response_model=HealthCheck,
|
||||
)
|
||||
def get_health() -> HealthCheck:
|
||||
"""
|
||||
## Perform a Health Check
|
||||
Endpoint to perform a healthcheck on. This endpoint can primarily be used Docker
|
||||
to ensure a robust container orchestration and management is in place. Other
|
||||
services which rely on proper functioning of the API service will not deploy if this
|
||||
endpoint returns any other HTTP status code except 200 (OK).
|
||||
Returns:
|
||||
HealthCheck: Returns a JSON response with the health status
|
||||
"""
|
||||
return HealthCheck(status="OK")
|
||||
Reference in new issue
Block a user