From fe5ab8b2be740b24387d748f2178d60a269e2ce8 Mon Sep 17 00:00:00 2001 From: codey Date: Sun, 16 Feb 2025 07:56:33 -0500 Subject: [PATCH] misc --- README.md | 3 ++- endpoints/karma.py | 2 +- endpoints/radio.py | 5 +++-- endpoints/transcriptions.py | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f853c9d..e0b90d7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ API Server Rewrite -FastAPI - https://fastapi.tiangolo.com/ \ No newline at end of file +FastAPI - https://fastapi.tiangolo.com/ +[Swagger UI](https://api.codey.lol/docs) \ No newline at end of file diff --git a/endpoints/karma.py b/endpoints/karma.py index bd63c76..8291716 100644 --- a/endpoints/karma.py +++ b/endpoints/karma.py @@ -114,7 +114,7 @@ class Karma(FastAPI): for endpoint, handler in self.endpoints.items(): app.add_api_route(f"/{endpoint}", handler, methods=["POST"], - include_in_schema=False) + include_in_schema=True) async def top_karma_handler(self, request: Request, diff --git a/endpoints/radio.py b/endpoints/radio.py index 0d0abf6..2a45a29 100644 --- a/endpoints/radio.py +++ b/endpoints/radio.py @@ -42,11 +42,12 @@ class Radio(FastAPI): for endpoint, handler in self.endpoints.items(): app.add_api_route(f"/{endpoint}", handler, methods=["POST"], - include_in_schema=False) # change include_in_schema to False + include_in_schema=True) # NOTE: Not in loop because method is GET for this endpoint app.add_api_route("/radio/album_art", self.album_art_handler, methods=["GET"], - include_in_schema=True) + include_in_schema=True) + asyncio.get_event_loop().run_until_complete(self.radio_util.load_playlist()) asyncio.get_event_loop().run_until_complete(self.radio_util._ls_skip()) diff --git a/endpoints/transcriptions.py b/endpoints/transcriptions.py index ce8ec76..d6a45a9 100644 --- a/endpoints/transcriptions.py +++ b/endpoints/transcriptions.py @@ -24,7 +24,7 @@ class Transcriptions(FastAPI): for endpoint, handler in self.endpoints.items(): app.add_api_route(f"/{endpoint}", handler, methods=["POST"], - include_in_schema=False) + include_in_schema=True) async def get_episodes_handler(self, data: ValidShowEpisodeListRequest) -> JSONResponse: """