Add healthcheck

This commit is contained in:
2022-02-05 10:36:35 +03:00
parent c43636731b
commit d50728d100
6 changed files with 128 additions and 6 deletions

View File

@@ -2,6 +2,7 @@ from app.views.author import author_router, translator_router
from app.views.author_annotation import author_annotation_router
from app.views.book import book_router
from app.views.book_annotation import book_annotation_router
from app.views.healthcheck import healtcheck_router
from app.views.sequence import sequence_router
from app.views.source import source_router
from app.views.translation import translation_router
@@ -16,4 +17,5 @@ routers = [
book_annotation_router,
translation_router,
sequence_router,
healtcheck_router,
]

View File

@@ -0,0 +1,15 @@
from fastapi import APIRouter, Depends
from app.depends import check_token
healtcheck_router = APIRouter(
prefix="/api/v1",
tags=["healthcheck"],
dependencies=[Depends(check_token)],
)
@healtcheck_router.get("/healthcheck")
async def healthcheck():
return "Ok!"