From 5beeed465ec6cf0839cc7c79294d2c49c60f1211 Mon Sep 17 00:00:00 2001 From: 0880 <98263509+0880880@users.noreply.github.com> Date: Sat, 17 Jan 2026 02:01:19 +0330 Subject: [PATCH] Add joining by ID --- app.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index e3c5047..6ea8324 100644 --- a/app.py +++ b/app.py @@ -189,9 +189,17 @@ class Room: rooms: dict[str, Room] = {} +API_ROOT = "http://127.0.0.1:8080" + + @app.GET("/") async def home(request): - return render("index.html", {"API_ROOT": "http://127.0.0.1:8080"}) + return render("index.html", {"API_ROOT": API_ROOT}) + + +@app.GET("/") +async def home_with_id(request, id): + return render("index.html", {"API_ROOT": API_ROOT}) @app.POST("/join/")