Skip to content

Commit 67308b4

Browse files
committed
CHANGES:
- RestAPI: /player_info returns the current server now (or null) - RestAPI: /servers also returns a list of current players now - RestAPI: /current_server added
1 parent 4c9129a commit 67308b4

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

plugins/restapi/commands.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ def filter_servers(servers: list[Server]):
350350
# add current players
351351
data['player'] = [PlayerEntry.model_validate({
352352
"nick": player.name,
353-
"current_server": server.name,
354353
"unit_type": player.unit_type,
355354
"callsign": player.unit_callsign
356355
}) for player in server.players.values()]

plugins/restapi/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ class PlayerStats(BaseModel):
355355

356356
class PlayerEntry(BaseModel):
357357
nick: str = Field(..., description="Player name")
358-
current_server: str = Field(..., description="Current server")
359358
unit_type: str = Field(..., description="Type of aircraft")
360359
callsign: str = Field(..., description="Callsign of the aircraft")
361360

0 commit comments

Comments
 (0)