Refactors Services and API Endpoints

This commit is contained in:
2024-05-20 22:36:42 -03:00
parent aeaa45bde6
commit 83f531c2d7
16 changed files with 172 additions and 120 deletions

View File

@@ -1,11 +1,15 @@
from storage_service.model.health_check.health_check_response import (
HealthCheckResponse,
)
from fastapi import APIRouter
from fastapi_utils.cbv import cbv
health_router = APIRouter()
health_router = APIRouter(tags=["health"])
@cbv(health_router)
class HealthCheckerController:
@health_router.get("/health", status_code=200)
def health(self) -> dict[str, str]:
return {"status": "healthy"}
def health(self) -> HealthCheckResponse:
return HealthCheckResponse(status="healthy")