Skip to content

Commit

Permalink
feat: error message in case its not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ldyy committed Nov 15, 2024
1 parent 10318de commit c572274
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions comet/api/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c572274

Please sign in to comment.