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='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',
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user