unlist most endpoints

This commit is contained in:
codey 2025-01-29 15:48:47 -05:00
parent e82d7b6727
commit ca02c9a731
6 changed files with 12 additions and 6 deletions

View File

@ -50,7 +50,8 @@ class AI(FastAPI):
}
for endpoint, handler in self.endpoints.items():
app.add_api_route(f"/{endpoint}", handler, methods=["GET", "POST"])
app.add_api_route(f"/{endpoint}", handler, methods=["GET", "POST"],
include_in_schema=False)
async def respond_via_webhook(self, data: ValidHookSongRequest, originalRequest: Request):

View File

@ -119,7 +119,8 @@ class Karma(FastAPI):
}
for endpoint, handler in self.endpoints.items():
app.add_api_route(f"/{endpoint}", handler, methods=["POST"])
app.add_api_route(f"/{endpoint}", handler, methods=["POST"],
include_in_schema=False)
async def top_karma_handler(self, request: Request, data: ValidTopKarmaRequest | None = None):

View File

@ -73,7 +73,8 @@ class LastFM(FastAPI):
}
for endpoint, handler in self.endpoints.items():
app.add_api_route(f"/{endpoint}", handler, methods=["POST"])
app.add_api_route(f"/{endpoint}", handler, methods=["POST"],
include_in_schema=False)
async def artist_by_name_handler(self, data: ValidArtistSearchRequest):
"""

View File

@ -36,7 +36,8 @@ class Transcriptions(FastAPI):
}
for endpoint, handler in self.endpoints.items():
app.add_api_route(f"/{endpoint}", handler, methods=["POST"])
app.add_api_route(f"/{endpoint}", handler, methods=["POST"],
include_in_schema=False)
async def get_episodes_handler(self, data: ValidShowEpisodeListRequest):
"""

View File

@ -42,7 +42,8 @@ class XC(FastAPI):
app.add_api_websocket_route(f"/{endpoint}/", handler)
for endpoint, handler in self.endpoints.items():
app.add_api_route(f"/{endpoint}", handler, methods=["POST"])
app.add_api_route(f"/{endpoint}", handler, methods=["POST"],
include_in_schema=False)
# async def put_ws_handler(self, ws: WebSocket):
# await ws.accept()

View File

@ -27,7 +27,8 @@ class YT(FastAPI):
}
for endpoint, handler in self.endpoints.items():
app.add_api_route(f"/{endpoint}", handler, methods=["POST"])
app.add_api_route(f"/{endpoint}", handler, methods=["POST"],
include_in_schema=False)
async def yt_video_search_handler(self, data: ValidYTSearchRequest):
"""