Fix /health needing authentication

This commit is contained in:
Nexus 2024-06-06 00:25:23 +01:00
parent da799b3ab5
commit b8d5df6bbf
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -55,10 +55,12 @@ def get_db_factory(n: int = 11) -> typing.Callable[[], typing.Generator[redis.Re
app = FastAPI( app = FastAPI(
title="Jimmy v3 API", title="Jimmy v3 API",
version="3.0.0", version="3.0.0",
dependencies=[Depends(check_credentials)],
root_path=os.getenv("WEB_ROOT_PATH", "") + "/api" root_path=os.getenv("WEB_ROOT_PATH", "") + "/api"
) )
truth_router = APIRouter(prefix="/truths") truth_router = APIRouter(
prefix="/truths",
dependencies=[Depends(check_credentials)],
)
@truth_router.get("") @truth_router.get("")
@ -134,7 +136,10 @@ def delete_truth(truth_id: str, db: redis.Redis = Depends(get_db_factory())):
app.include_router(truth_router) app.include_router(truth_router)
ollama_router = APIRouter(prefix="/ollama") ollama_router = APIRouter(
prefix="/ollama",
dependencies=[Depends(check_credentials)],
)
@app.get("/threads") @app.get("/threads")