RockCoder23 commited on
Commit
5fae15a
·
verified ·
1 Parent(s): d3e2372

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -10,16 +10,17 @@ servers: Dict[str, dict] = {}
10
  TIMEOUT = 60
11
  lock = asyncio.Lock()
12
 
13
- # ✅ Fixed model (no more 422 issues)
14
  class ServerInfo(BaseModel):
15
  ID: str
16
- PlaceId: Optional[int] = 0
17
- MaxPlayers: Optional[int] = 0
18
- CurrentPlayers: Optional[int] = 0
19
- Heartbeat: Optional[float] = 0
20
- ISPRIVATE: Optional[bool] = False
21
- ActiveEvents: Optional[Dict[str, Any]] = {}
22
 
 
 
23
  def prune_servers():
24
  now = time.time()
25
  expired = [
 
10
  TIMEOUT = 60
11
  lock = asyncio.Lock()
12
 
 
13
  class ServerInfo(BaseModel):
14
  ID: str
15
+ PlaceId: int
16
+ MaxPlayers: int
17
+ CurrentPlayers: int
18
+ Heartbeat: float
19
+ ISPRIVATE: bool = False
20
+ ActiveEvents: List[str] = []
21
 
22
+ class Config:
23
+ extra = "ignore"
24
  def prune_servers():
25
  now = time.time()
26
  expired = [