API status check implemented
This commit is contained in:
parent
b13f128cca
commit
94095288b7
@ -2,7 +2,8 @@ from os import makedirs, path
|
|||||||
from modules.app import app
|
from modules.app import app
|
||||||
from modules.utils import configGet
|
from modules.utils import configGet
|
||||||
from modules.extensions_loader import dynamic_import_from_src
|
from modules.extensions_loader import dynamic_import_from_src
|
||||||
from fastapi.responses import FileResponse
|
from fastapi.responses import FileResponse, Response
|
||||||
|
from starlette.status import HTTP_200_OK
|
||||||
|
|
||||||
makedirs(configGet("data", "locations"), exist_ok=True)
|
makedirs(configGet("data", "locations"), exist_ok=True)
|
||||||
|
|
||||||
@ -15,6 +16,10 @@ for entry in [path.join(configGet("data", "locations"), "api_keys.json"), path.j
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/check", response_class=Response, include_in_schema=False)
|
||||||
|
async def check():
|
||||||
|
return Response(HTTP_200_OK)
|
||||||
|
|
||||||
@app.get("/favicon.ico", response_class=FileResponse, include_in_schema=False)
|
@app.get("/favicon.ico", response_class=FileResponse, include_in_schema=False)
|
||||||
async def favicon():
|
async def favicon():
|
||||||
return FileResponse("favicon.ico")
|
return FileResponse("favicon.ico")
|
||||||
|
Loading…
Reference in New Issue
Block a user