Finagling for remote.

This commit is contained in:
g_it 2026-03-31 12:13:22 +02:00
commit 9136c86e71
Signed by untrusted user who does not match committer: g_it
GPG key ID: A2B0A7C06A054627

View file

@ -1,6 +1,6 @@
from fastapi import FastAPI from fastapi import FastAPI
from fastapi.responses import RedirectResponse
from scalar_fastapi import get_scalar_api_reference from scalar_fastapi import get_scalar_api_reference
from app.routes import discovery, reviews, stats from app.routes import discovery, reviews, stats
DESCRIPTION = """ DESCRIPTION = """
@ -57,7 +57,8 @@ app = FastAPI(
@app.get("/docs", include_in_schema=False) @app.get("/docs", include_in_schema=False)
async def scalar_docs(): async def scalar_docs():
return get_scalar_api_reference( return get_scalar_api_reference(
openapi_url=f"{app.root_path}{app.openapi_url}", # openapi_url=f"{app.root_path}{app.openapi_url}",
openapi_url="/technical/api/openapi.json",
title=app.title, title=app.title,
force_dark_mode_state="light", force_dark_mode_state="light",
hide_dark_mode_toggle=True, hide_dark_mode_toggle=True,
@ -69,6 +70,10 @@ app.include_router(reviews.router)
app.include_router(discovery.router) app.include_router(discovery.router)
app.include_router(stats.router) app.include_router(stats.router)
@app.get("/", include_in_schema=False)
def root_redirect():
return RedirectResponse(url="/technical/api/docs")
@app.get("/health", tags=["System"]) @app.get("/health", tags=["System"])
def health_check(): def health_check():
"""Verify the API is running.""" """Verify the API is running."""