From 0b315011282da07dc2aa2d91298b4a4a36601238 Mon Sep 17 00:00:00 2001 From: Paul Haedrich <38889179+berrysauce@users.noreply.github.com> Date: Fri, 11 Oct 2024 15:06:58 +0200 Subject: [PATCH] Re-added docs redirect --- Spacefile | 11 ----------- main.py | 6 ++---- 2 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 Spacefile diff --git a/Spacefile b/Spacefile deleted file mode 100644 index f68371c..0000000 --- a/Spacefile +++ /dev/null @@ -1,11 +0,0 @@ -# Spacefile Docs: https://go.deta.dev/docs/spacefile/v0 -v: 0 -micros: - - name: ingredients-api - src: ./ - engine: python3.9 - primary: false - public: true - path: / - run: uvicorn main:app - dev: .venv/bin/uvicorn main:app --reload diff --git a/main.py b/main.py index 5f4830c..cf841cf 100644 --- a/main.py +++ b/main.py @@ -30,8 +30,8 @@ app = FastAPI( title="Ingredients – API", - #license_info="https://github.com/berrysauce/ingredients/blob/main/LICENSE.md", - #docs_url=None, + license_info="https://github.com/berrysauce/ingredients/blob/main/LICENSE.md", + docs_url=None, redoc_url=None ) @@ -56,11 +56,9 @@ def get_root(): return HTMLResponse(content=f.read()) -""" @app.get("/docs") def get_docs(): return RedirectResponse(url="https://github.com/berrysauce/ingredients/blob/main/README.md#-using-the-api", status_code=301) -""" @app.get("/ingredients", response_class=JSONResponse)