diff options
Diffstat (limited to 'pkg/api/api0/server.go')
-rw-r--r-- | pkg/api/api0/server.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/api/api0/server.go b/pkg/api/api0/server.go index 3c748a2..bb25790 100644 --- a/pkg/api/api0/server.go +++ b/pkg/api/api0/server.go @@ -245,10 +245,11 @@ func (h *Handler) handleServerUpsert(w http.ResponseWriter, r *http.Request) { if n, err := strconv.ParseUint(r.URL.Query().Get("playerCount"), 10, 8); err == nil { if canCreate { - s.MaxPlayers = int(n) + s.PlayerCount = int(n) } if canUpdate { - s.MaxPlayers = int(n) + x := int(n) + u.PlayerCount = &x } } @@ -257,7 +258,8 @@ func (h *Handler) handleServerUpsert(w http.ResponseWriter, r *http.Request) { s.MaxPlayers = int(n) } if canUpdate { - s.MaxPlayers = int(n) + x := int(n) + u.MaxPlayers = &x } } } |