Remove request in response
This commit is contained in:
3
app.py
3
app.py
@@ -234,7 +234,6 @@ async def new_room(request):
|
|||||||
key = room_key()
|
key = room_key()
|
||||||
rooms[key] = Room()
|
rooms[key] = Room()
|
||||||
return JSONResponse(
|
return JSONResponse(
|
||||||
request,
|
|
||||||
{
|
{
|
||||||
"id": key,
|
"id": key,
|
||||||
},
|
},
|
||||||
@@ -320,7 +319,6 @@ async def join(request, room_id):
|
|||||||
player = room.add_player()
|
player = room.add_player()
|
||||||
if player:
|
if player:
|
||||||
return JSONResponse(
|
return JSONResponse(
|
||||||
request,
|
|
||||||
{
|
{
|
||||||
"code": "JOIN",
|
"code": "JOIN",
|
||||||
"id": player[0],
|
"id": player[0],
|
||||||
@@ -336,7 +334,6 @@ async def join(request, room_id):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return JSONResponse(
|
return JSONResponse(
|
||||||
request,
|
|
||||||
{
|
{
|
||||||
"code": "FULL",
|
"code": "FULL",
|
||||||
"error": "Room Full",
|
"error": "Room Full",
|
||||||
|
|||||||
Reference in New Issue
Block a user