Ramesh-vani commited on
Commit
190657e
·
verified ·
1 Parent(s): 4f4cba2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -222,12 +222,13 @@ async def handler(websocket):
222
  elif "watch" in event:
223
  # Spectator watches an existing game.
224
  await watch(websocket, event["watch"])
225
- elif "command" in event:
226
-
227
- await execute_command(websocket, event["project_name"], event["command"])
228
  else:
229
  # First player starts a new game.
230
  await start(websocket, message)
 
 
 
231
 
232
  # assert event["type"] == "cmd"
233
 
 
222
  elif "watch" in event:
223
  # Spectator watches an existing game.
224
  await watch(websocket, event["watch"])
225
+
 
 
226
  else:
227
  # First player starts a new game.
228
  await start(websocket, message)
229
+ elif event["type"] == "cmd":
230
+ # Execute a command in the project folder.
231
+ await execute_command(websocket, event["project_name"], event["command"])
232
 
233
  # assert event["type"] == "cmd"
234