Реализовать лабораторную работу 2

This commit is contained in:
2026-10-18 15:53:16 +03:00
parent 65003b6119
commit be7a90132b
48 changed files with 1921 additions and 23 deletions
+17
View File
@@ -0,0 +1,17 @@
from fastapi import APIRouter, Request
from app.core.errors import ApiError
router = APIRouter()
@router.get('/health/live')
async def live():
return {'status': 'ok'}
@router.get('/health/ready')
async def ready(request: Request):
if not await request.app.state.storage.ready():
raise ApiError(503, 'Storage is unavailable')
return {'status': 'ok'}