Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -433,12 +433,7 @@ async def start_game(request: Request):
|
|
| 433 |
async def delete_game(request: Request):
|
| 434 |
data = await request.json()
|
| 435 |
pin = data.get("pin")
|
| 436 |
-
newPin =
|
| 437 |
-
newGame = games.get(newPin)
|
| 438 |
-
|
| 439 |
-
while newGame:
|
| 440 |
-
newPin = random.randint(100000, 999999)
|
| 441 |
-
newGame = games.get(newPin)
|
| 442 |
|
| 443 |
if not pin:
|
| 444 |
raise HTTPException(status_code=400, detail="PIN is required.")
|
|
|
|
| 433 |
async def delete_game(request: Request):
|
| 434 |
data = await request.json()
|
| 435 |
pin = data.get("pin")
|
| 436 |
+
newPin = data.get("newPin")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 437 |
|
| 438 |
if not pin:
|
| 439 |
raise HTTPException(status_code=400, detail="PIN is required.")
|