Compare commits
No commits in common. "cecee2ff35690d1e987b7dd24e1aed79f5295af4" and "40b8bd42fd3f2f2ea38fce342a421ebf09812829" have entirely different histories.
cecee2ff35
...
40b8bd42fd
BIN
dist/rchat-1.0.0-py3-none-any.whl
vendored
BIN
dist/rchat-1.0.0-py3-none-any.whl
vendored
Binary file not shown.
BIN
dist/rchat-1.0.0.tar.gz
vendored
BIN
dist/rchat-1.0.0.tar.gz
vendored
Binary file not shown.
@ -5,8 +5,10 @@ from rchat.app import create_app
|
||||
|
||||
def main():
|
||||
app = create_app()
|
||||
web.run_app(app, port=3018)
|
||||
web.run_app(app, port=8080)
|
||||
|
||||
|
||||
# Run the server
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
# static/index.html
|
||||
|
@ -33,11 +33,11 @@ class Application(BaseApplication):
|
||||
ws = web.WebSocketResponse()
|
||||
await ws.prepare(request)
|
||||
session = request.session
|
||||
if "username" not in session:
|
||||
session["username"] = fake.name().split(" ")[0]
|
||||
session["uid"] = str(uuid.uuid4())
|
||||
session["session_id"] = session["uid"]
|
||||
|
||||
if not 'username' in session:
|
||||
session['username'] = fake.name().split(" ")[0]
|
||||
session['uid'] = str(uuid.uuid4())
|
||||
session['session_id'] = session['uid']
|
||||
|
||||
username = session["username"]
|
||||
session_id = session["session_id"]
|
||||
uid = session["uid"]
|
||||
|
Loading…
Reference in New Issue
Block a user