WebHost: fix /api/get_rooms and /api/get_seeds
This commit is contained in:
parent
684bb736bc
commit
1990b893e5
|
@ -65,7 +65,6 @@ def generate_api():
|
|||
return {"text": "Uncaught Exception:" + str(e)}, 500
|
||||
|
||||
|
||||
|
||||
@api_endpoints.route('/status/<suuid:seed>')
|
||||
def wait_seed_api(seed: UUID):
|
||||
seed_id = seed
|
||||
|
|
|
@ -16,7 +16,6 @@ def get_rooms():
|
|||
"last_port": room.last_port,
|
||||
"timeout": room.timeout,
|
||||
"tracker": room.tracker,
|
||||
"players": room.seed.multidata["names"] if room.seed.multidata else [["Singleplayer"]],
|
||||
})
|
||||
return jsonify(response)
|
||||
|
||||
|
@ -28,6 +27,6 @@ def get_seeds():
|
|||
response.append({
|
||||
"seed_id": seed.id,
|
||||
"creation_time": seed.creation_time,
|
||||
"players": seed.multidata["names"] if seed.multidata else [["Singleplayer"]],
|
||||
"players": [(slot.player_name, slot.game) for slot in seed.slots],
|
||||
})
|
||||
return jsonify(response)
|
Loading…
Reference in New Issue