Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ async def create_game(request: Request):
|
|
| 37 |
"currentChallenge": None,
|
| 38 |
"pendingCardLoss": None,
|
| 39 |
"votes": [],
|
| 40 |
-
"permissions": {player_name:
|
| 41 |
}
|
| 42 |
|
| 43 |
return {"success": True, "message": "Game created successfully!"}
|
|
@@ -163,7 +163,7 @@ async def join_game(request: Request):
|
|
| 163 |
|
| 164 |
game["players"].append(player_name)
|
| 165 |
# Add the new player's permission as 1 in the dictionary
|
| 166 |
-
game["permissions"][player_name] =
|
| 167 |
return {"success": True, "message": "Player joined successfully!"}
|
| 168 |
|
| 169 |
@app.put("/api/startGame")
|
|
|
|
| 37 |
"currentChallenge": None,
|
| 38 |
"pendingCardLoss": None,
|
| 39 |
"votes": [],
|
| 40 |
+
"permissions": {player_name: True} # using a dictionary for permissions
|
| 41 |
}
|
| 42 |
|
| 43 |
return {"success": True, "message": "Game created successfully!"}
|
|
|
|
| 163 |
|
| 164 |
game["players"].append(player_name)
|
| 165 |
# Add the new player's permission as 1 in the dictionary
|
| 166 |
+
game["permissions"][player_name] = True
|
| 167 |
return {"success": True, "message": "Player joined successfully!"}
|
| 168 |
|
| 169 |
@app.put("/api/startGame")
|