Forgot to readd join function!
This commit is contained in:
7
main.py
7
main.py
@@ -27,6 +27,13 @@ def settings():
|
||||
def room(room_code):
|
||||
return render_template('room.html', room_code=room_code)
|
||||
|
||||
@app.route('/api/room/<code>', methods=['GET'])
|
||||
def check_room(code):
|
||||
room = registry.get_room(code)
|
||||
if not room:
|
||||
return jsonify({"error": "Room not found"}), 404
|
||||
return jsonify({"code": room.code})
|
||||
|
||||
@socketio.on('message')
|
||||
def handle_message(data):
|
||||
room_code = data['room']
|
||||
|
||||
Reference in New Issue
Block a user