feat: add health check endpoint and change swagger's name

This commit is contained in:
2026-06-29 10:47:05 +03:00
parent 612963a606
commit 33b8f1ed8a

View File

@@ -80,7 +80,7 @@ app: FastAPI = FastAPI(
redoc_url=None, redoc_url=None,
docs_url=None, docs_url=None,
lifespan=lifespan, lifespan=lifespan,
title='Elcsa Users Service' title='Elcsa. Pay service Service'
) )
app.add_exception_handler(ApplicationException, application_exception_handler) app.add_exception_handler(ApplicationException, application_exception_handler)
@@ -143,3 +143,10 @@ async def ping() -> dict[str, str]:
'message': 'pong', 'message': 'pong',
'status': 'ok', 'status': 'ok',
} }
@app.get('/health')
async def health() -> dict[str, str]:
return {
'status': 'ok',
}