From c572274fc9fc520c85d93bff407fcd033c0f0937 Mon Sep 17 00:00:00 2001 From: Goldy <153996346+g0ldyy@users.noreply.github.com> Date: Sat, 16 Nov 2024 00:35:18 +0100 Subject: [PATCH] feat: error message in case its not configured --- comet/api/stream.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/comet/api/stream.py b/comet/api/stream.py index 7ed0a71..61f7261 100644 --- a/comet/api/stream.py +++ b/comet/api/stream.py @@ -38,6 +38,17 @@ @streams.get("/stream/{type}/{id}.json") +async def stream_noconfig(request: Request, type: str, id: str): + return { + "streams": [ + { + "name": "[⚠️] Comet", + "description": f"{request.url.scheme}://{request.url.netloc}/configure", + "url": "https://comet.fast", + } + ] + } + @streams.get("/{b64config}/stream/{type}/{id}.json") async def stream(request: Request, b64config: str, type: str, id: str): config = config_check(b64config)