chore: remove trailing whitespace and normalize string quotes in app.py websocket handler

This commit is contained in:
retoor 2024-12-05 18:39:02 +00:00
parent 421e969d35
commit 99cf3da9ab
3 changed files with 5 additions and 5 deletions

Binary file not shown.

Binary file not shown.

View File

@ -33,10 +33,10 @@ class Application(BaseApplication):
ws = web.WebSocketResponse() ws = web.WebSocketResponse()
await ws.prepare(request) await ws.prepare(request)
session = request.session session = request.session
if not 'username' in session: if "username" not in session:
session['username'] = fake.name().split(" ")[0] session["username"] = fake.name().split(" ")[0]
session['uid'] = str(uuid.uuid4()) session["uid"] = str(uuid.uuid4())
session['session_id'] = session['uid'] session["session_id"] = session["uid"]
username = session["username"] username = session["username"]
session_id = session["session_id"] session_id = session["session_id"]