mirror of
https://github.com/g0ldyy/comet.git
synced 2026-01-12 01:16:12 +01:00
feat: error message in case its not configured
This commit is contained in:
@@ -38,6 +38,17 @@ streams = APIRouter()
|
||||
|
||||
|
||||
@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)
|
||||
|
||||
Reference in New Issue
Block a user