This commit is contained in:
codey 2025-02-16 07:56:33 -05:00
parent e67d2874e4
commit fe5ab8b2be
4 changed files with 7 additions and 5 deletions

View File

@ -1,3 +1,4 @@
API Server Rewrite
FastAPI - https://fastapi.tiangolo.com/
[Swagger UI](https://api.codey.lol/docs)

View File

@ -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,

View File

@ -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)
asyncio.get_event_loop().run_until_complete(self.radio_util.load_playlist())
asyncio.get_event_loop().run_until_complete(self.radio_util._ls_skip())

View File

@ -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:
"""