Spaces:
Paused
Paused
Update app.py
Browse files
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 |
-
|
| 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 |
|