feat: add health check endpoint and change swagger's name
This commit is contained in:
@@ -80,7 +80,7 @@ app: FastAPI = FastAPI(
|
|||||||
redoc_url=None,
|
redoc_url=None,
|
||||||
docs_url=None,
|
docs_url=None,
|
||||||
lifespan=lifespan,
|
lifespan=lifespan,
|
||||||
title='Bitforce. Users Service',
|
title='Elcsa. Users Service',
|
||||||
version='1.0.0',
|
version='1.0.0',
|
||||||
description='',
|
description='',
|
||||||
license_info={
|
license_info={
|
||||||
@@ -147,3 +147,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',
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user